From fce20d525a8c4b5acbf389784227b360117fadaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 00:31:37 +0000 Subject: [PATCH 01/28] Bump Submodule/github/rest-api-description from `45124e4` to `b8a14b7` Bumps [Submodule/github/rest-api-description](https://github.com/github/rest-api-description) from `45124e4` to `b8a14b7`. - [Release notes](https://github.com/github/rest-api-description/releases) - [Commits](https://github.com/github/rest-api-description/compare/45124e4c9ec27bbbfa40dd67c1b8d8341099195f...b8a14b78a08975af4295c103ea347f8f42f0e684) --- updated-dependencies: - dependency-name: Submodule/github/rest-api-description dependency-version: b8a14b78a08975af4295c103ea347f8f42f0e684 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 45124e4c9e..b8a14b78a0 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 45124e4c9ec27bbbfa40dd67c1b8d8341099195f +Subproject commit b8a14b78a08975af4295c103ea347f8f42f0e684 From 6df5253930fda1af30cde5b99baeca118b3e9051 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:56:24 +0000 Subject: [PATCH 02/28] Commit via running: make Sources/actions --- Sources/actions/Client.swift | 355 ++++++++ Sources/actions/Types.swift | 1509 +++++++++++++++++++++++++++++----- 2 files changed, 1667 insertions(+), 197 deletions(-) diff --git a/Sources/actions/Client.swift b/Sources/actions/Client.swift index bfeb01673d..74bc1fc6aa 100644 --- a/Sources/actions/Client.swift +++ b/Sources/actions/Client.swift @@ -364,6 +364,361 @@ public struct Client: APIProtocol { } ) } + /// List custom images for an organization + /// + /// List custom images for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/get(actions/list-custom-images-for-org)`. + public func actionsListCustomImagesForOrg(_ input: Operations.ActionsListCustomImagesForOrg.Input) async throws -> Operations.ActionsListCustomImagesForOrg.Output { + try await client.send( + input: input, + forOperation: Operations.ActionsListCustomImagesForOrg.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/hosted-runners/images/custom", + 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.ActionsListCustomImagesForOrg.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.ActionsListCustomImagesForOrg.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 a custom image definition for GitHub Actions Hosted Runners + /// + /// Get a custom image definition for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/get(actions/get-custom-image-for-org)`. + public func actionsGetCustomImageForOrg(_ input: Operations.ActionsGetCustomImageForOrg.Input) async throws -> Operations.ActionsGetCustomImageForOrg.Output { + try await client.send( + input: input, + forOperation: Operations.ActionsGetCustomImageForOrg.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/hosted-runners/images/custom/{}", + parameters: [ + input.path.org, + input.path.imageDefinitionId + ] + ) + 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.ActionsGetCustomImageForOrg.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.ActionsHostedRunnerCustomImage.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 + ) + ) + } + } + ) + } + /// Delete a custom image from the organization + /// + /// Delete a custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/delete(actions/delete-custom-image-from-org)`. + public func actionsDeleteCustomImageFromOrg(_ input: Operations.ActionsDeleteCustomImageFromOrg.Input) async throws -> Operations.ActionsDeleteCustomImageFromOrg.Output { + try await client.send( + input: input, + forOperation: Operations.ActionsDeleteCustomImageFromOrg.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/hosted-runners/images/custom/{}", + parameters: [ + input.path.org, + input.path.imageDefinitionId + ] + ) + 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 image versions of a custom image for an organization + /// + /// List image versions of a custom image for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/get(actions/list-custom-image-versions-for-org)`. + public func actionsListCustomImageVersionsForOrg(_ input: Operations.ActionsListCustomImageVersionsForOrg.Input) async throws -> Operations.ActionsListCustomImageVersionsForOrg.Output { + try await client.send( + input: input, + forOperation: Operations.ActionsListCustomImageVersionsForOrg.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/hosted-runners/images/custom/{}/versions", + parameters: [ + input.path.org, + input.path.imageDefinitionId + ] + ) + 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.ActionsListCustomImageVersionsForOrg.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.ActionsListCustomImageVersionsForOrg.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 an image version of a custom image for GitHub Actions Hosted Runners + /// + /// Get an image version of a custom image for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/get(actions/get-custom-image-version-for-org)`. + public func actionsGetCustomImageVersionForOrg(_ input: Operations.ActionsGetCustomImageVersionForOrg.Input) async throws -> Operations.ActionsGetCustomImageVersionForOrg.Output { + try await client.send( + input: input, + forOperation: Operations.ActionsGetCustomImageVersionForOrg.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/hosted-runners/images/custom/{}/versions/{}", + parameters: [ + input.path.org, + input.path.imageDefinitionId, + input.path.version + ] + ) + 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.ActionsGetCustomImageVersionForOrg.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.ActionsHostedRunnerCustomImageVersion.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 + ) + ) + } + } + ) + } + /// Delete an image version of custom image from the organization + /// + /// Delete an image version of custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/delete(actions/delete-custom-image-version-from-org)`. + public func actionsDeleteCustomImageVersionFromOrg(_ input: Operations.ActionsDeleteCustomImageVersionFromOrg.Input) async throws -> Operations.ActionsDeleteCustomImageVersionFromOrg.Output { + try await client.send( + input: input, + forOperation: Operations.ActionsDeleteCustomImageVersionFromOrg.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/actions/hosted-runners/images/custom/{}/versions/{}", + parameters: [ + input.path.org, + input.path.imageDefinitionId, + input.path.version + ] + ) + 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 + ) + ) + } + } + ) + } /// Get GitHub-owned images for GitHub-hosted runners in an organization /// /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 3f19ab2ad5..6323cc65d3 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -48,6 +48,60 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `POST /orgs/{org}/actions/hosted-runners`. /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/post(actions/create-hosted-runner-for-org)`. func actionsCreateHostedRunnerForOrg(_ input: Operations.ActionsCreateHostedRunnerForOrg.Input) async throws -> Operations.ActionsCreateHostedRunnerForOrg.Output + /// List custom images for an organization + /// + /// List custom images for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/get(actions/list-custom-images-for-org)`. + func actionsListCustomImagesForOrg(_ input: Operations.ActionsListCustomImagesForOrg.Input) async throws -> Operations.ActionsListCustomImagesForOrg.Output + /// Get a custom image definition for GitHub Actions Hosted Runners + /// + /// Get a custom image definition for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/get(actions/get-custom-image-for-org)`. + func actionsGetCustomImageForOrg(_ input: Operations.ActionsGetCustomImageForOrg.Input) async throws -> Operations.ActionsGetCustomImageForOrg.Output + /// Delete a custom image from the organization + /// + /// Delete a custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/delete(actions/delete-custom-image-from-org)`. + func actionsDeleteCustomImageFromOrg(_ input: Operations.ActionsDeleteCustomImageFromOrg.Input) async throws -> Operations.ActionsDeleteCustomImageFromOrg.Output + /// List image versions of a custom image for an organization + /// + /// List image versions of a custom image for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/get(actions/list-custom-image-versions-for-org)`. + func actionsListCustomImageVersionsForOrg(_ input: Operations.ActionsListCustomImageVersionsForOrg.Input) async throws -> Operations.ActionsListCustomImageVersionsForOrg.Output + /// Get an image version of a custom image for GitHub Actions Hosted Runners + /// + /// Get an image version of a custom image for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/get(actions/get-custom-image-version-for-org)`. + func actionsGetCustomImageVersionForOrg(_ input: Operations.ActionsGetCustomImageVersionForOrg.Input) async throws -> Operations.ActionsGetCustomImageVersionForOrg.Output + /// Delete an image version of custom image from the organization + /// + /// Delete an image version of custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/delete(actions/delete-custom-image-version-from-org)`. + func actionsDeleteCustomImageVersionFromOrg(_ input: Operations.ActionsDeleteCustomImageVersionFromOrg.Input) async throws -> Operations.ActionsDeleteCustomImageVersionFromOrg.Output /// Get GitHub-owned images for GitHub-hosted runners in an organization /// /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. @@ -1835,6 +1889,96 @@ extension APIProtocol { body: body )) } + /// List custom images for an organization + /// + /// List custom images for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/get(actions/list-custom-images-for-org)`. + public func actionsListCustomImagesForOrg( + path: Operations.ActionsListCustomImagesForOrg.Input.Path, + headers: Operations.ActionsListCustomImagesForOrg.Input.Headers = .init() + ) async throws -> Operations.ActionsListCustomImagesForOrg.Output { + try await actionsListCustomImagesForOrg(Operations.ActionsListCustomImagesForOrg.Input( + path: path, + headers: headers + )) + } + /// Get a custom image definition for GitHub Actions Hosted Runners + /// + /// Get a custom image definition for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/get(actions/get-custom-image-for-org)`. + public func actionsGetCustomImageForOrg( + path: Operations.ActionsGetCustomImageForOrg.Input.Path, + headers: Operations.ActionsGetCustomImageForOrg.Input.Headers = .init() + ) async throws -> Operations.ActionsGetCustomImageForOrg.Output { + try await actionsGetCustomImageForOrg(Operations.ActionsGetCustomImageForOrg.Input( + path: path, + headers: headers + )) + } + /// Delete a custom image from the organization + /// + /// Delete a custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/delete(actions/delete-custom-image-from-org)`. + public func actionsDeleteCustomImageFromOrg(path: Operations.ActionsDeleteCustomImageFromOrg.Input.Path) async throws -> Operations.ActionsDeleteCustomImageFromOrg.Output { + try await actionsDeleteCustomImageFromOrg(Operations.ActionsDeleteCustomImageFromOrg.Input(path: path)) + } + /// List image versions of a custom image for an organization + /// + /// List image versions of a custom image for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/get(actions/list-custom-image-versions-for-org)`. + public func actionsListCustomImageVersionsForOrg( + path: Operations.ActionsListCustomImageVersionsForOrg.Input.Path, + headers: Operations.ActionsListCustomImageVersionsForOrg.Input.Headers = .init() + ) async throws -> Operations.ActionsListCustomImageVersionsForOrg.Output { + try await actionsListCustomImageVersionsForOrg(Operations.ActionsListCustomImageVersionsForOrg.Input( + path: path, + headers: headers + )) + } + /// Get an image version of a custom image for GitHub Actions Hosted Runners + /// + /// Get an image version of a custom image for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/get(actions/get-custom-image-version-for-org)`. + public func actionsGetCustomImageVersionForOrg( + path: Operations.ActionsGetCustomImageVersionForOrg.Input.Path, + headers: Operations.ActionsGetCustomImageVersionForOrg.Input.Headers = .init() + ) async throws -> Operations.ActionsGetCustomImageVersionForOrg.Output { + try await actionsGetCustomImageVersionForOrg(Operations.ActionsGetCustomImageVersionForOrg.Input( + path: path, + headers: headers + )) + } + /// Delete an image version of custom image from the organization + /// + /// Delete an image version of custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/delete(actions/delete-custom-image-version-from-org)`. + public func actionsDeleteCustomImageVersionFromOrg(path: Operations.ActionsDeleteCustomImageVersionFromOrg.Input.Path) async throws -> Operations.ActionsDeleteCustomImageVersionFromOrg.Output { + try await actionsDeleteCustomImageVersionFromOrg(Operations.ActionsDeleteCustomImageVersionFromOrg.Input(path: path)) + } /// Get GitHub-owned images for GitHub-hosted runners in an organization /// /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. @@ -6554,163 +6698,6 @@ public enum Components { case installationsCount = "installations_count" } } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. - public struct PullRequestMinimal: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. - 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`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. - public struct HeadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/ref`. - public var ref: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/sha`. - public var sha: Swift.String - /// - 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.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`. - public var name: Swift.String - /// Creates a new `RepoPayload`. - /// - /// - Parameters: - /// - id: - /// - url: - /// - name: - public init( - id: Swift.Int64, - url: Swift.String, - name: Swift.String - ) { - self.id = id - self.url = url - self.name = name - } - public enum CodingKeys: String, CodingKey { - case id - case url - case name - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. - public var repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload - /// Creates a new `HeadPayload`. - /// - /// - Parameters: - /// - ref: - /// - sha: - /// - repo: - public init( - ref: Swift.String, - sha: Swift.String, - repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload - ) { - self.ref = ref - self.sha = sha - self.repo = repo - } - public enum CodingKeys: String, CodingKey { - case ref - case sha - case repo - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. - public var head: Components.Schemas.PullRequestMinimal.HeadPayload - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. - public struct BasePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/ref`. - public var ref: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/sha`. - public var sha: Swift.String - /// - 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.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`. - public var name: Swift.String - /// Creates a new `RepoPayload`. - /// - /// - Parameters: - /// - id: - /// - url: - /// - name: - public init( - id: Swift.Int64, - url: Swift.String, - name: Swift.String - ) { - self.id = id - self.url = url - self.name = name - } - public enum CodingKeys: String, CodingKey { - case id - case url - case name - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. - public var repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload - /// Creates a new `BasePayload`. - /// - /// - Parameters: - /// - ref: - /// - sha: - /// - repo: - public init( - ref: Swift.String, - sha: Swift.String, - repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload - ) { - self.ref = ref - self.sha = sha - self.repo = repo - } - public enum CodingKeys: String, CodingKey { - case ref - case sha - case repo - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. - public var base: Components.Schemas.PullRequestMinimal.BasePayload - /// Creates a new `PullRequestMinimal`. - /// - /// - Parameters: - /// - id: - /// - number: - /// - url: - /// - head: - /// - base: - public init( - id: Swift.Int64, - number: Swift.Int, - url: Swift.String, - head: Components.Schemas.PullRequestMinimal.HeadPayload, - base: Components.Schemas.PullRequestMinimal.BasePayload - ) { - self.id = id - self.number = number - self.url = url - self.head = head - self.base = base - } - public enum CodingKeys: String, CodingKey { - case id - case number - case url - case head - case base - } - } /// - Remark: Generated from `#/components/schemas/security-and-analysis`. public struct SecurityAndAnalysis: Codable, Hashable, Sendable { /// Enable or disable GitHub Advanced Security for the repository. @@ -7661,6 +7648,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/nullable-actions-hosted-runner-pool-image/source`. public var source: Components.Schemas.NullableActionsHostedRunnerPoolImage.SourcePayload + /// The image version of the hosted runner pool. + /// + /// - Remark: Generated from `#/components/schemas/nullable-actions-hosted-runner-pool-image/version`. + public var version: Swift.String? /// Creates a new `NullableActionsHostedRunnerPoolImage`. /// /// - Parameters: @@ -7668,22 +7659,26 @@ public enum Components { /// - sizeGb: Image size in GB. /// - displayName: Display name for this image. /// - source: The image provider. + /// - version: The image version of the hosted runner pool. public init( id: Swift.String, sizeGb: Swift.Int, displayName: Swift.String, - source: Components.Schemas.NullableActionsHostedRunnerPoolImage.SourcePayload + source: Components.Schemas.NullableActionsHostedRunnerPoolImage.SourcePayload, + version: Swift.String? = nil ) { self.id = id self.sizeGb = sizeGb self.displayName = displayName self.source = source + self.version = version } public enum CodingKeys: String, CodingKey { case id case sizeGb = "size_gb" case displayName = "display_name" case source + case version } } /// Provides details of a particular machine spec. @@ -7822,6 +7817,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/actions-hosted-runner/last_active_on`. public var lastActiveOn: Foundation.Date? + /// Whether custom image generation is enabled for the hosted runners. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner/image_gen`. + public var imageGen: Swift.Bool? /// Creates a new `ActionsHostedRunner`. /// /// - Parameters: @@ -7836,6 +7835,7 @@ public enum Components { /// - publicIpEnabled: Whether public IP is enabled for the hosted runners. /// - publicIps: The public IP ranges when public IP is enabled for the hosted runners. /// - lastActiveOn: The time at which the runner was last used, in ISO 8601 format. + /// - imageGen: Whether custom image generation is enabled for the hosted runners. public init( id: Swift.Int, name: Swift.String, @@ -7847,7 +7847,8 @@ public enum Components { maximumRunners: Swift.Int? = nil, publicIpEnabled: Swift.Bool, publicIps: [Components.Schemas.PublicIp]? = nil, - lastActiveOn: Foundation.Date? = nil + lastActiveOn: Foundation.Date? = nil, + imageGen: Swift.Bool? = nil ) { self.id = id self.name = name @@ -7860,6 +7861,7 @@ public enum Components { self.publicIpEnabled = publicIpEnabled self.publicIps = publicIps self.lastActiveOn = lastActiveOn + self.imageGen = imageGen } public enum CodingKeys: String, CodingKey { case id @@ -7873,53 +7875,184 @@ public enum Components { case publicIpEnabled = "public_ip_enabled" case publicIps = "public_ips" case lastActiveOn = "last_active_on" + case imageGen = "image_gen" } } - /// Provides details of a hosted runner image + /// Provides details of a custom runner image /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image`. - public struct ActionsHostedRunnerCuratedImage: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image`. + public struct ActionsHostedRunnerCustomImage: Codable, Hashable, Sendable { /// The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/id`. - public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/id`. + public var id: Swift.Int /// The operating system of the image. /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/platform`. + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/platform`. public var platform: Swift.String - /// Image size in GB. + /// Total size of all the image versions in GB. /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/size_gb`. - public var sizeGb: Swift.Int + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/total_versions_size`. + public var totalVersionsSize: Swift.Int /// Display name for this image. /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/display_name`. - public var displayName: Swift.String + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/name`. + public var name: Swift.String /// The image provider. /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/source`. - @frozen public enum SourcePayload: String, Codable, Hashable, Sendable, CaseIterable { - case github = "github" - case partner = "partner" - case custom = "custom" - } - /// The image provider. + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/source`. + public var source: Swift.String + /// The number of image versions associated with the image. /// - /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/source`. - public var source: Components.Schemas.ActionsHostedRunnerCuratedImage.SourcePayload - /// Creates a new `ActionsHostedRunnerCuratedImage`. + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/versions_count`. + public var versionsCount: Swift.Int + /// The latest image version associated with the image. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/latest_version`. + public var latestVersion: Swift.String + /// The number of image versions associated with the image. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image/state`. + public var state: Swift.String + /// Creates a new `ActionsHostedRunnerCustomImage`. /// /// - Parameters: /// - id: The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. /// - platform: The operating system of the image. - /// - sizeGb: Image size in GB. - /// - displayName: Display name for this image. + /// - totalVersionsSize: Total size of all the image versions in GB. + /// - name: Display name for this image. /// - source: The image provider. + /// - versionsCount: The number of image versions associated with the image. + /// - latestVersion: The latest image version associated with the image. + /// - state: The number of image versions associated with the image. public init( - id: Swift.String, + id: Swift.Int, platform: Swift.String, - sizeGb: Swift.Int, - displayName: Swift.String, + totalVersionsSize: Swift.Int, + name: Swift.String, + source: Swift.String, + versionsCount: Swift.Int, + latestVersion: Swift.String, + state: Swift.String + ) { + self.id = id + self.platform = platform + self.totalVersionsSize = totalVersionsSize + self.name = name + self.source = source + self.versionsCount = versionsCount + self.latestVersion = latestVersion + self.state = state + } + public enum CodingKeys: String, CodingKey { + case id + case platform + case totalVersionsSize = "total_versions_size" + case name + case source + case versionsCount = "versions_count" + case latestVersion = "latest_version" + case state + } + } + /// Provides details of a hosted runner custom image version + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image-version`. + public struct ActionsHostedRunnerCustomImageVersion: Codable, Hashable, Sendable { + /// The version of image. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image-version/version`. + public var version: Swift.String + /// The state of image version. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image-version/state`. + public var state: Swift.String + /// Image version size in GB. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image-version/size_gb`. + public var sizeGb: Swift.Int + /// The creation date time of the image version. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image-version/created_on`. + public var createdOn: Swift.String + /// The image version status details. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-custom-image-version/state_details`. + public var stateDetails: Swift.String + /// Creates a new `ActionsHostedRunnerCustomImageVersion`. + /// + /// - Parameters: + /// - version: The version of image. + /// - state: The state of image version. + /// - sizeGb: Image version size in GB. + /// - createdOn: The creation date time of the image version. + /// - stateDetails: The image version status details. + public init( + version: Swift.String, + state: Swift.String, + sizeGb: Swift.Int, + createdOn: Swift.String, + stateDetails: Swift.String + ) { + self.version = version + self.state = state + self.sizeGb = sizeGb + self.createdOn = createdOn + self.stateDetails = stateDetails + } + public enum CodingKeys: String, CodingKey { + case version + case state + case sizeGb = "size_gb" + case createdOn = "created_on" + case stateDetails = "state_details" + } + } + /// Provides details of a hosted runner image + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image`. + public struct ActionsHostedRunnerCuratedImage: Codable, Hashable, Sendable { + /// The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/id`. + public var id: Swift.String + /// The operating system of the image. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/platform`. + public var platform: Swift.String + /// Image size in GB. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/size_gb`. + public var sizeGb: Swift.Int + /// Display name for this image. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/display_name`. + public var displayName: Swift.String + /// The image provider. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/source`. + @frozen public enum SourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case github = "github" + case partner = "partner" + case custom = "custom" + } + /// The image provider. + /// + /// - Remark: Generated from `#/components/schemas/actions-hosted-runner-curated-image/source`. + public var source: Components.Schemas.ActionsHostedRunnerCuratedImage.SourcePayload + /// Creates a new `ActionsHostedRunnerCuratedImage`. + /// + /// - Parameters: + /// - id: The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. + /// - platform: The operating system of the image. + /// - sizeGb: Image size in GB. + /// - displayName: Display name for this image. + /// - source: The image provider. + public init( + id: Swift.String, + platform: Swift.String, + sizeGb: Swift.Int, + displayName: Swift.String, source: Components.Schemas.ActionsHostedRunnerCuratedImage.SourcePayload ) { self.id = id @@ -9866,6 +9999,163 @@ public enum Components { case ref } } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. + public struct PullRequestMinimal: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. + 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`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. + public struct HeadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/ref`. + public var ref: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/sha`. + public var sha: Swift.String + /// - 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.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`. + public var name: Swift.String + /// Creates a new `RepoPayload`. + /// + /// - Parameters: + /// - id: + /// - url: + /// - name: + public init( + id: Swift.Int64, + url: Swift.String, + name: Swift.String + ) { + self.id = id + self.url = url + self.name = name + } + public enum CodingKeys: String, CodingKey { + case id + case url + case name + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. + public var repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload + /// Creates a new `HeadPayload`. + /// + /// - Parameters: + /// - ref: + /// - sha: + /// - repo: + public init( + ref: Swift.String, + sha: Swift.String, + repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload + ) { + self.ref = ref + self.sha = sha + self.repo = repo + } + public enum CodingKeys: String, CodingKey { + case ref + case sha + case repo + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. + public var head: Components.Schemas.PullRequestMinimal.HeadPayload + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. + public struct BasePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/ref`. + public var ref: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/sha`. + public var sha: Swift.String + /// - 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.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`. + public var name: Swift.String + /// Creates a new `RepoPayload`. + /// + /// - Parameters: + /// - id: + /// - url: + /// - name: + public init( + id: Swift.Int64, + url: Swift.String, + name: Swift.String + ) { + self.id = id + self.url = url + self.name = name + } + public enum CodingKeys: String, CodingKey { + case id + case url + case name + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. + public var repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload + /// Creates a new `BasePayload`. + /// + /// - Parameters: + /// - ref: + /// - sha: + /// - repo: + public init( + ref: Swift.String, + sha: Swift.String, + repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload + ) { + self.ref = ref + self.sha = sha + self.repo = repo + } + public enum CodingKeys: String, CodingKey { + case ref + case sha + case repo + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. + public var base: Components.Schemas.PullRequestMinimal.BasePayload + /// Creates a new `PullRequestMinimal`. + /// + /// - Parameters: + /// - id: + /// - number: + /// - url: + /// - head: + /// - base: + public init( + id: Swift.Int64, + number: Swift.Int, + url: Swift.String, + head: Components.Schemas.PullRequestMinimal.HeadPayload, + base: Components.Schemas.PullRequestMinimal.BasePayload + ) { + self.id = id + self.number = number + self.url = url + self.head = head + self.base = base + } + public enum CodingKeys: String, CodingKey { + case id + case number + case url + case head + case base + } + } /// A commit. /// /// - Remark: Generated from `#/components/schemas/nullable-simple-commit`. @@ -11214,6 +11504,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias Page = Swift.Int + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -11222,10 +11516,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/repo`. public typealias Repo = Swift.String - /// The organization name. The name is not case sensitive. + /// Image definition ID of custom image /// - /// - Remark: Generated from `#/components/parameters/org`. - public typealias Org = Swift.String + /// - Remark: Generated from `#/components/parameters/actions-custom-image-definition-id`. + public typealias ActionsCustomImageDefinitionId = Swift.Int + /// Version of a custom image + /// + /// - Remark: Generated from `#/components/parameters/actions-custom-image-version`. + public typealias ActionsCustomImageVersion = Swift.String /// Unique identifier of the GitHub-hosted runner. /// /// - Remark: Generated from `#/components/parameters/hosted-runner-id`. @@ -12440,21 +12738,29 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/POST/requestBody/json/image/source`. public var source: Operations.ActionsCreateHostedRunnerForOrg.Input.Body.JsonPayload.ImagePayload.SourcePayload? + /// The version of the runner image to deploy. This is relevant only for runners using custom images. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/POST/requestBody/json/image/version`. + public var version: Swift.String? /// Creates a new `ImagePayload`. /// /// - Parameters: /// - id: The unique identifier of the runner image. /// - source: The source of the runner image. + /// - version: The version of the runner image to deploy. This is relevant only for runners using custom images. public init( id: Swift.String? = nil, - source: Operations.ActionsCreateHostedRunnerForOrg.Input.Body.JsonPayload.ImagePayload.SourcePayload? = nil + source: Operations.ActionsCreateHostedRunnerForOrg.Input.Body.JsonPayload.ImagePayload.SourcePayload? = nil, + version: Swift.String? = nil ) { self.id = id self.source = source + self.version = version } public enum CodingKeys: String, CodingKey { case id case source + case version } } /// The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. @@ -12477,6 +12783,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/POST/requestBody/json/enable_static_ip`. public var enableStaticIp: Swift.Bool? + /// Whether this runner should be used to generate custom images. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/POST/requestBody/json/image_gen`. + public var imageGen: Swift.Bool? /// Creates a new `JsonPayload`. /// /// - Parameters: @@ -12486,13 +12796,15 @@ public enum Operations { /// - runnerGroupId: The existing runner group to add this runner to. /// - maximumRunners: The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. /// - enableStaticIp: Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` + /// - imageGen: Whether this runner should be used to generate custom images. public init( name: Swift.String, image: Operations.ActionsCreateHostedRunnerForOrg.Input.Body.JsonPayload.ImagePayload, size: Swift.String, runnerGroupId: Swift.Int, maximumRunners: Swift.Int? = nil, - enableStaticIp: Swift.Bool? = nil + enableStaticIp: Swift.Bool? = nil, + imageGen: Swift.Bool? = nil ) { self.name = name self.image = image @@ -12500,6 +12812,7 @@ public enum Operations { self.runnerGroupId = runnerGroupId self.maximumRunners = maximumRunners self.enableStaticIp = enableStaticIp + self.imageGen = imageGen } public enum CodingKeys: String, CodingKey { case name @@ -12508,6 +12821,7 @@ public enum Operations { case runnerGroupId = "runner_group_id" case maximumRunners = "maximum_runners" case enableStaticIp = "enable_static_ip" + case imageGen = "image_gen" } } /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/POST/requestBody/content/application\/json`. @@ -12613,14 +12927,807 @@ public enum Operations { } } } - /// Get GitHub-owned images for GitHub-hosted runners in an organization + /// List custom images for an organization /// - /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. + /// List custom images for an organization. /// - /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/github-owned`. - /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/github-owned/get(actions/get-hosted-runners-github-owned-images-for-org)`. - public enum ActionsGetHostedRunnersGithubOwnedImagesForOrg { - public static let id: Swift.String = "actions/get-hosted-runners-github-owned-images-for-org" + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/get(actions/list-custom-images-for-org)`. + public enum ActionsListCustomImagesForOrg { + public static let id: Swift.String = "actions/list-custom-images-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/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.ActionsListCustomImagesForOrg.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/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.ActionsListCustomImagesForOrg.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.ActionsListCustomImagesForOrg.Input.Path, + headers: Operations.ActionsListCustomImagesForOrg.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}/actions/hosted-runners/images/custom/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/GET/responses/200/content/json/total_count`. + public var totalCount: Swift.Int + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/GET/responses/200/content/json/images`. + public var images: [Components.Schemas.ActionsHostedRunnerCustomImage] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - totalCount: + /// - images: + public init( + totalCount: Swift.Int, + images: [Components.Schemas.ActionsHostedRunnerCustomImage] + ) { + self.totalCount = totalCount + self.images = images + } + public enum CodingKeys: String, CodingKey { + case totalCount = "total_count" + case images + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/GET/responses/200/content/application\/json`. + case json(Operations.ActionsListCustomImagesForOrg.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.ActionsListCustomImagesForOrg.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ActionsListCustomImagesForOrg.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ActionsListCustomImagesForOrg.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/get(actions/list-custom-images-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.ActionsListCustomImagesForOrg.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.ActionsListCustomImagesForOrg.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 + ] + } + } + } + /// Get a custom image definition for GitHub Actions Hosted Runners + /// + /// Get a custom image definition for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/get(actions/get-custom-image-for-org)`. + public enum ActionsGetCustomImageForOrg { + public static let id: Swift.String = "actions/get-custom-image-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/GET/path/org`. + public var org: Components.Parameters.Org + /// Image definition ID of custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/GET/path/image_definition_id`. + public var imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - imageDefinitionId: Image definition ID of custom image + public init( + org: Components.Parameters.Org, + imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + ) { + self.org = org + self.imageDefinitionId = imageDefinitionId + } + } + public var path: Operations.ActionsGetCustomImageForOrg.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_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.ActionsGetCustomImageForOrg.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.ActionsGetCustomImageForOrg.Input.Path, + headers: Operations.ActionsGetCustomImageForOrg.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}/actions/hosted-runners/images/custom/{image_definition_id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.ActionsHostedRunnerCustomImage) + /// 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.ActionsHostedRunnerCustomImage { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ActionsGetCustomImageForOrg.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ActionsGetCustomImageForOrg.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/get(actions/get-custom-image-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.ActionsGetCustomImageForOrg.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.ActionsGetCustomImageForOrg.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 + ] + } + } + } + /// Delete a custom image from the organization + /// + /// Delete a custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/delete(actions/delete-custom-image-from-org)`. + public enum ActionsDeleteCustomImageFromOrg { + public static let id: Swift.String = "actions/delete-custom-image-from-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/DELETE/path/org`. + public var org: Components.Parameters.Org + /// Image definition ID of custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/DELETE/path/image_definition_id`. + public var imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - imageDefinitionId: Image definition ID of custom image + public init( + org: Components.Parameters.Org, + imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + ) { + self.org = org + self.imageDefinitionId = imageDefinitionId + } + } + public var path: Operations.ActionsDeleteCustomImageFromOrg.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.ActionsDeleteCustomImageFromOrg.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}/actions/hosted-runners/images/custom/{image_definition_id}/delete(actions/delete-custom-image-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.ActionsDeleteCustomImageFromOrg.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/delete(actions/delete-custom-image-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// 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.ActionsDeleteCustomImageFromOrg.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 image versions of a custom image for an organization + /// + /// List image versions of a custom image for an organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/get(actions/list-custom-image-versions-for-org)`. + public enum ActionsListCustomImageVersionsForOrg { + public static let id: Swift.String = "actions/list-custom-image-versions-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/path`. + public struct Path: Sendable, Hashable { + /// Image definition ID of custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/path/image_definition_id`. + public var imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/path/org`. + public var org: Components.Parameters.Org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - imageDefinitionId: Image definition ID of custom image + /// - org: The organization name. The name is not case sensitive. + public init( + imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId, + org: Components.Parameters.Org + ) { + self.imageDefinitionId = imageDefinitionId + self.org = org + } + } + public var path: Operations.ActionsListCustomImageVersionsForOrg.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/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.ActionsListCustomImageVersionsForOrg.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.ActionsListCustomImageVersionsForOrg.Input.Path, + headers: Operations.ActionsListCustomImageVersionsForOrg.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}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/responses/200/content/json/total_count`. + public var totalCount: Swift.Int + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/responses/200/content/json/image_versions`. + public var imageVersions: [Components.Schemas.ActionsHostedRunnerCustomImageVersion] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - totalCount: + /// - imageVersions: + public init( + totalCount: Swift.Int, + imageVersions: [Components.Schemas.ActionsHostedRunnerCustomImageVersion] + ) { + self.totalCount = totalCount + self.imageVersions = imageVersions + } + public enum CodingKeys: String, CodingKey { + case totalCount = "total_count" + case imageVersions = "image_versions" + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/GET/responses/200/content/application\/json`. + case json(Operations.ActionsListCustomImageVersionsForOrg.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.ActionsListCustomImageVersionsForOrg.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ActionsListCustomImageVersionsForOrg.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ActionsListCustomImageVersionsForOrg.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/get(actions/list-custom-image-versions-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.ActionsListCustomImageVersionsForOrg.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.ActionsListCustomImageVersionsForOrg.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 + ] + } + } + } + /// Get an image version of a custom image for GitHub Actions Hosted Runners + /// + /// Get an image version of a custom image for GitHub Actions Hosted Runners. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/get(actions/get-custom-image-version-for-org)`. + public enum ActionsGetCustomImageVersionForOrg { + public static let id: Swift.String = "actions/get-custom-image-version-for-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/GET/path/org`. + public var org: Components.Parameters.Org + /// Image definition ID of custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/GET/path/image_definition_id`. + public var imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + /// Version of a custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/GET/path/version`. + public var version: Components.Parameters.ActionsCustomImageVersion + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - imageDefinitionId: Image definition ID of custom image + /// - version: Version of a custom image + public init( + org: Components.Parameters.Org, + imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId, + version: Components.Parameters.ActionsCustomImageVersion + ) { + self.org = org + self.imageDefinitionId = imageDefinitionId + self.version = version + } + } + public var path: Operations.ActionsGetCustomImageVersionForOrg.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/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.ActionsGetCustomImageVersionForOrg.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.ActionsGetCustomImageVersionForOrg.Input.Path, + headers: Operations.ActionsGetCustomImageVersionForOrg.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}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.ActionsHostedRunnerCustomImageVersion) + /// 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.ActionsHostedRunnerCustomImageVersion { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.ActionsGetCustomImageVersionForOrg.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.ActionsGetCustomImageVersionForOrg.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/get(actions/get-custom-image-version-for-org)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.ActionsGetCustomImageVersionForOrg.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.ActionsGetCustomImageVersionForOrg.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 + ] + } + } + } + /// Delete an image version of custom image from the organization + /// + /// Delete an image version of custom image from the organization. + /// + /// OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// - Remark: HTTP `DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/delete(actions/delete-custom-image-version-from-org)`. + public enum ActionsDeleteCustomImageVersionFromOrg { + public static let id: Swift.String = "actions/delete-custom-image-version-from-org" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/DELETE/path/org`. + public var org: Components.Parameters.Org + /// Image definition ID of custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/DELETE/path/image_definition_id`. + public var imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId + /// Version of a custom image + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/DELETE/path/version`. + public var version: Components.Parameters.ActionsCustomImageVersion + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - imageDefinitionId: Image definition ID of custom image + /// - version: Version of a custom image + public init( + org: Components.Parameters.Org, + imageDefinitionId: Components.Parameters.ActionsCustomImageDefinitionId, + version: Components.Parameters.ActionsCustomImageVersion + ) { + self.org = org + self.imageDefinitionId = imageDefinitionId + self.version = version + } + } + public var path: Operations.ActionsDeleteCustomImageVersionFromOrg.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.ActionsDeleteCustomImageVersionFromOrg.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}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/delete(actions/delete-custom-image-version-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.ActionsDeleteCustomImageVersionFromOrg.Output.NoContent) + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}/delete(actions/delete-custom-image-version-from-org)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// 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.ActionsDeleteCustomImageVersionFromOrg.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 GitHub-owned images for GitHub-hosted runners in an organization + /// + /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. + /// + /// - Remark: HTTP `GET /orgs/{org}/actions/hosted-runners/images/github-owned`. + /// - Remark: Generated from `#/paths//orgs/{org}/actions/hosted-runners/images/github-owned/get(actions/get-hosted-runners-github-owned-images-for-org)`. + public enum ActionsGetHostedRunnersGithubOwnedImagesForOrg { + public static let id: Swift.String = "actions/get-hosted-runners-github-owned-images-for-org" public struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/images/github-owned/GET/path`. public struct Path: Sendable, Hashable { @@ -13593,6 +14700,10 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/enable_static_ip`. public var enableStaticIp: Swift.Bool? + /// The version of the runner image to deploy. This is relevant only for runners using custom images. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/json/image_version`. + public var imageVersion: Swift.String? /// Creates a new `JsonPayload`. /// /// - Parameters: @@ -13600,22 +14711,26 @@ public enum Operations { /// - runnerGroupId: The existing runner group to add this runner to. /// - maximumRunners: The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. /// - enableStaticIp: Whether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` + /// - imageVersion: The version of the runner image to deploy. This is relevant only for runners using custom images. public init( name: Swift.String? = nil, runnerGroupId: Swift.Int? = nil, maximumRunners: Swift.Int? = nil, - enableStaticIp: Swift.Bool? = nil + enableStaticIp: Swift.Bool? = nil, + imageVersion: Swift.String? = nil ) { self.name = name self.runnerGroupId = runnerGroupId self.maximumRunners = maximumRunners self.enableStaticIp = enableStaticIp + self.imageVersion = imageVersion } public enum CodingKeys: String, CodingKey { case name case runnerGroupId = "runner_group_id" case maximumRunners = "maximum_runners" case enableStaticIp = "enable_static_ip" + case imageVersion = "image_version" } } /// - Remark: Generated from `#/paths/orgs/{org}/actions/hosted-runners/{hosted_runner_id}/PATCH/requestBody/content/application\/json`. From 4eee71d77755bc05dc6de74386a1a9b3cc418c8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:56:47 +0000 Subject: [PATCH 03/28] Commit via running: make Sources/activity --- Sources/activity/Types.swift | 1704 +++++++++++++++++++++++++++++----- 1 file changed, 1484 insertions(+), 220 deletions(-) diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 76c3f219c5..40c706a7b4 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -1034,6 +1034,89 @@ public enum Components { case status } } + /// An enterprise on GitHub. + /// + /// - Remark: Generated from `#/components/schemas/enterprise`. + public struct Enterprise: Codable, Hashable, Sendable { + /// A short description of the enterprise. + /// + /// - Remark: Generated from `#/components/schemas/enterprise/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/enterprise/html_url`. + public var htmlUrl: Swift.String + /// The enterprise's website URL. + /// + /// - Remark: Generated from `#/components/schemas/enterprise/website_url`. + public var websiteUrl: Swift.String? + /// Unique identifier of the enterprise + /// + /// - Remark: Generated from `#/components/schemas/enterprise/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/enterprise/node_id`. + public var nodeId: Swift.String + /// The name of the enterprise. + /// + /// - Remark: Generated from `#/components/schemas/enterprise/name`. + public var name: Swift.String + /// The slug url identifier for the enterprise. + /// + /// - Remark: Generated from `#/components/schemas/enterprise/slug`. + public var slug: Swift.String + /// - Remark: Generated from `#/components/schemas/enterprise/created_at`. + public var createdAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/enterprise/updated_at`. + public var updatedAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/enterprise/avatar_url`. + public var avatarUrl: Swift.String + /// Creates a new `Enterprise`. + /// + /// - Parameters: + /// - description: A short description of the enterprise. + /// - htmlUrl: + /// - websiteUrl: The enterprise's website URL. + /// - id: Unique identifier of the enterprise + /// - nodeId: + /// - name: The name of the enterprise. + /// - slug: The slug url identifier for the enterprise. + /// - createdAt: + /// - updatedAt: + /// - avatarUrl: + public init( + description: Swift.String? = nil, + htmlUrl: Swift.String, + websiteUrl: Swift.String? = nil, + id: Swift.Int, + nodeId: Swift.String, + name: Swift.String, + slug: Swift.String, + createdAt: Foundation.Date? = nil, + updatedAt: Foundation.Date? = nil, + avatarUrl: Swift.String + ) { + self.description = description + self.htmlUrl = htmlUrl + self.websiteUrl = websiteUrl + self.id = id + self.nodeId = nodeId + self.name = name + self.slug = slug + self.createdAt = createdAt + self.updatedAt = updatedAt + self.avatarUrl = avatarUrl + } + public enum CodingKeys: String, CodingKey { + case description + case htmlUrl = "html_url" + case websiteUrl = "website_url" + case id + case nodeId = "node_id" + case name + case slug + case createdAt = "created_at" + case updatedAt = "updated_at" + case avatarUrl = "avatar_url" + } + } /// Validation Error /// /// - Remark: Generated from `#/components/schemas/validation-error`. @@ -2143,79 +2226,1351 @@ public enum Components { /// Creates a new `CodeOfConduct`. /// /// - Parameters: - /// - key: - /// - name: - /// - url: - /// - body: + /// - key: + /// - name: + /// - url: + /// - body: + /// - htmlUrl: + public init( + key: Swift.String, + name: Swift.String, + url: Swift.String, + body: Swift.String? = nil, + htmlUrl: Swift.String? = nil + ) { + self.key = key + self.name = name + self.url = url + self.body = body + self.htmlUrl = htmlUrl + } + public enum CodingKeys: String, CodingKey { + case key + case name + case url + case body + case htmlUrl = "html_url" + } + } + /// Actor + /// + /// - Remark: Generated from `#/components/schemas/actor`. + public struct Actor: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/actor/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/actor/login`. + public var login: Swift.String + /// - Remark: Generated from `#/components/schemas/actor/display_login`. + public var displayLogin: Swift.String? + /// - Remark: Generated from `#/components/schemas/actor/gravatar_id`. + public var gravatarId: Swift.String? + /// - Remark: Generated from `#/components/schemas/actor/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/actor/avatar_url`. + public var avatarUrl: Swift.String + /// Creates a new `Actor`. + /// + /// - Parameters: + /// - id: + /// - login: + /// - displayLogin: + /// - gravatarId: + /// - url: + /// - avatarUrl: + public init( + id: Swift.Int, + login: Swift.String, + displayLogin: Swift.String? = nil, + gravatarId: Swift.String? = nil, + url: Swift.String, + avatarUrl: Swift.String + ) { + self.id = id + self.login = login + self.displayLogin = displayLogin + self.gravatarId = gravatarId + self.url = url + self.avatarUrl = avatarUrl + } + public enum CodingKeys: String, CodingKey { + case id + case login + case displayLogin = "display_login" + case gravatarId = "gravatar_id" + case url + case avatarUrl = "avatar_url" + } + } + /// A collection of related issues and pull requests. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone`. + public struct NullableMilestone: 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 htmlUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-milestone/labels_url`. + public var labelsUrl: 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 nodeId: 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, CaseIterable { + case open = "open" + case closed = "closed" + } + /// The state of the milestone. + /// + /// - Remark: Generated from `#/components/schemas/nullable-milestone/state`. + public var state: Components.Schemas.NullableMilestone.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.NullableSimpleUser? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/open_issues`. + public var openIssues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_issues`. + public var closedIssues: Swift.Int + /// - Remark: Generated from `#/components/schemas/nullable-milestone/created_at`. + public var createdAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/updated_at`. + public var updatedAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-milestone/closed_at`. + public var closedAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/nullable-milestone/due_on`. + public var dueOn: Foundation.Date? + /// Creates a new `NullableMilestone`. + /// + /// - Parameters: + /// - url: + /// - htmlUrl: + /// - labelsUrl: + /// - id: + /// - nodeId: + /// - number: The number of the milestone. + /// - state: The state of the milestone. + /// - title: The title of the milestone. + /// - description: + /// - creator: + /// - openIssues: + /// - closedIssues: + /// - createdAt: + /// - updatedAt: + /// - closedAt: + /// - dueOn: + public init( + url: Swift.String, + htmlUrl: Swift.String, + labelsUrl: Swift.String, + id: Swift.Int, + nodeId: Swift.String, + number: Swift.Int, + state: Components.Schemas.NullableMilestone.StatePayload, + title: Swift.String, + description: Swift.String? = nil, + creator: Components.Schemas.NullableSimpleUser? = nil, + openIssues: Swift.Int, + closedIssues: Swift.Int, + createdAt: Foundation.Date, + updatedAt: Foundation.Date, + closedAt: Foundation.Date? = nil, + dueOn: Foundation.Date? = nil + ) { + self.url = url + self.htmlUrl = htmlUrl + self.labelsUrl = labelsUrl + self.id = id + self.nodeId = nodeId + self.number = number + self.state = state + self.title = title + self.description = description + self.creator = creator + self.openIssues = openIssues + self.closedIssues = closedIssues + self.createdAt = createdAt + self.updatedAt = updatedAt + self.closedAt = closedAt + self.dueOn = dueOn + } + public enum CodingKeys: String, CodingKey { + case url + case htmlUrl = "html_url" + case labelsUrl = "labels_url" + case id + case nodeId = "node_id" + case number + case state + case title + case description + case creator + case openIssues = "open_issues" + case closedIssues = "closed_issues" + case createdAt = "created_at" + case updatedAt = "updated_at" + case closedAt = "closed_at" + case dueOn = "due_on" + } + } + /// The type of issue. + /// + /// - Remark: Generated from `#/components/schemas/issue-type`. + public struct IssueType: Codable, Hashable, Sendable { + /// The unique identifier of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/id`. + public var id: Swift.Int + /// The node identifier of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/node_id`. + public var nodeId: Swift.String + /// The name of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/name`. + public var name: Swift.String + /// The description of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/description`. + public var description: Swift.String? + /// The color of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/color`. + @frozen public enum ColorPayload: String, Codable, Hashable, Sendable, CaseIterable { + case gray = "gray" + case blue = "blue" + case green = "green" + case yellow = "yellow" + case orange = "orange" + case red = "red" + case pink = "pink" + case purple = "purple" + } + /// The color of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/color`. + public var color: Components.Schemas.IssueType.ColorPayload? + /// The time the issue type created. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/created_at`. + public var createdAt: Foundation.Date? + /// The time the issue type last updated. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/updated_at`. + public var updatedAt: Foundation.Date? + /// The enabled state of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type/is_enabled`. + public var isEnabled: Swift.Bool? + /// Creates a new `IssueType`. + /// + /// - Parameters: + /// - id: The unique identifier of the issue type. + /// - nodeId: The node identifier of the issue type. + /// - name: The name of the issue type. + /// - description: The description of the issue type. + /// - color: The color of the issue type. + /// - createdAt: The time the issue type created. + /// - updatedAt: The time the issue type last updated. + /// - isEnabled: The enabled state of the issue type. + public init( + id: Swift.Int, + nodeId: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + color: Components.Schemas.IssueType.ColorPayload? = nil, + createdAt: Foundation.Date? = nil, + updatedAt: Foundation.Date? = nil, + isEnabled: Swift.Bool? = nil + ) { + self.id = id + self.nodeId = nodeId + self.name = name + self.description = description + self.color = color + self.createdAt = createdAt + self.updatedAt = updatedAt + self.isEnabled = isEnabled + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case name + case description + case color + case createdAt = "created_at" + case updatedAt = "updated_at" + case isEnabled = "is_enabled" + } + } + /// 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 NullableIntegration: 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 nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/client_id`. + public var clientId: Swift.String? + /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. + @frozen public enum OwnerPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/nullable-integration/owner/case1`. + case SimpleUser(Components.Schemas.SimpleUser) + /// - Remark: Generated from `#/components/schemas/nullable-integration/owner/case2`. + case Enterprise(Components.Schemas.Enterprise) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .SimpleUser(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .Enterprise(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 .SimpleUser(value): + try value.encode(to: encoder) + case let .Enterprise(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/nullable-integration/owner`. + public var owner: Components.Schemas.NullableIntegration.OwnerPayload + /// 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 externalUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/html_url`. + public var htmlUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/nullable-integration/created_at`. + public var createdAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/nullable-integration/updated_at`. + public var updatedAt: 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: + /// - 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 issues + case checks + case metadata + case contents + case deployments + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.issues = try container.decodeIfPresent( + Swift.String.self, + forKey: .issues + ) + self.checks = try container.decodeIfPresent( + Swift.String.self, + forKey: .checks + ) + self.metadata = try container.decodeIfPresent( + Swift.String.self, + forKey: .metadata + ) + self.contents = try container.decodeIfPresent( + Swift.String.self, + forKey: .contents + ) + self.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( + self.issues, + forKey: .issues + ) + try container.encodeIfPresent( + self.checks, + forKey: .checks + ) + try container.encodeIfPresent( + self.metadata, + forKey: .metadata + ) + try container.encodeIfPresent( + self.contents, + forKey: .contents + ) + try container.encodeIfPresent( + self.deployments, + forKey: .deployments + ) + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// The set of permissions for the GitHub app + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/permissions`. + public var permissions: Components.Schemas.NullableIntegration.PermissionsPayload + /// The list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation. + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/events`. + public var events: [Swift.String] + /// The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself. + /// + /// - Remark: Generated from `#/components/schemas/nullable-integration/installations_count`. + public var installationsCount: Swift.Int? + /// Creates a new `NullableIntegration`. + /// + /// - Parameters: + /// - id: Unique identifier of the GitHub app + /// - slug: The slug name of the GitHub app + /// - nodeId: + /// - clientId: + /// - owner: + /// - name: The name of the GitHub app + /// - description: + /// - externalUrl: + /// - htmlUrl: + /// - createdAt: + /// - updatedAt: + /// - permissions: The set of permissions for the GitHub app + /// - events: The list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation. + /// - installationsCount: The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself. + public init( + id: Swift.Int, + slug: Swift.String? = nil, + nodeId: Swift.String, + clientId: Swift.String? = nil, + owner: Components.Schemas.NullableIntegration.OwnerPayload, + name: Swift.String, + description: Swift.String? = nil, + externalUrl: Swift.String, + htmlUrl: Swift.String, + createdAt: Foundation.Date, + updatedAt: Foundation.Date, + permissions: Components.Schemas.NullableIntegration.PermissionsPayload, + events: [Swift.String], + installationsCount: Swift.Int? = nil + ) { + self.id = id + self.slug = slug + self.nodeId = nodeId + self.clientId = clientId + self.owner = owner + self.name = name + self.description = description + self.externalUrl = externalUrl + self.htmlUrl = htmlUrl + self.createdAt = createdAt + self.updatedAt = updatedAt + self.permissions = permissions + self.events = events + self.installationsCount = installationsCount + } + public enum CodingKeys: String, CodingKey { + case id + case slug + case nodeId = "node_id" + case clientId = "client_id" + case owner + case name + case description + case externalUrl = "external_url" + case htmlUrl = "html_url" + case createdAt = "created_at" + case updatedAt = "updated_at" + case permissions + case events + case installationsCount = "installations_count" + } + } + /// How the author is associated with the repository. + /// + /// - Remark: Generated from `#/components/schemas/author-association`. + @frozen public enum AuthorAssociation: String, Codable, Hashable, Sendable, CaseIterable { + case collaborator = "COLLABORATOR" + case contributor = "CONTRIBUTOR" + case firstTimer = "FIRST_TIMER" + case firstTimeContributor = "FIRST_TIME_CONTRIBUTOR" + case mannequin = "MANNEQUIN" + case member = "MEMBER" + case none = "NONE" + case owner = "OWNER" + } + /// - Remark: Generated from `#/components/schemas/reaction-rollup`. + public struct ReactionRollup: 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 totalCount: 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 `ReactionRollup`. + /// + /// - Parameters: + /// - url: + /// - totalCount: + /// - _plus_1: + /// - _hyphen_1: + /// - laugh: + /// - confused: + /// - heart: + /// - hooray: + /// - eyes: + /// - rocket: + public init( + url: Swift.String, + totalCount: 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.totalCount = totalCount + 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 totalCount = "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/sub-issues-summary`. + public struct SubIssuesSummary: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/total`. + public var total: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/completed`. + public var completed: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issues-summary/percent_completed`. + public var percentCompleted: Swift.Int + /// Creates a new `SubIssuesSummary`. + /// + /// - Parameters: + /// - total: + /// - completed: + /// - percentCompleted: + public init( + total: Swift.Int, + completed: Swift.Int, + percentCompleted: Swift.Int + ) { + self.total = total + self.completed = completed + self.percentCompleted = percentCompleted + } + public enum CodingKeys: String, CodingKey { + case total + case completed + case percentCompleted = "percent_completed" + } + } + /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary`. + public struct IssueDependenciesSummary: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary/blocked_by`. + public var blockedBy: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary/blocking`. + public var blocking: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary/total_blocked_by`. + public var totalBlockedBy: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary/total_blocking`. + public var totalBlocking: Swift.Int + /// Creates a new `IssueDependenciesSummary`. + /// + /// - Parameters: + /// - blockedBy: + /// - blocking: + /// - totalBlockedBy: + /// - totalBlocking: + public init( + blockedBy: Swift.Int, + blocking: Swift.Int, + totalBlockedBy: Swift.Int, + totalBlocking: Swift.Int + ) { + self.blockedBy = blockedBy + self.blocking = blocking + self.totalBlockedBy = totalBlockedBy + self.totalBlocking = totalBlocking + } + public enum CodingKeys: String, CodingKey { + case blockedBy = "blocked_by" + case blocking + case totalBlockedBy = "total_blocked_by" + case totalBlocking = "total_blocking" + } + } + /// A value assigned to an issue field + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value`. + public struct IssueFieldValue: Codable, Hashable, Sendable { + /// Unique identifier for the issue field. + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`. + public var issueFieldId: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`. + public var nodeId: Swift.String + /// The data type of the issue field + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`. + @frozen public enum DataTypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case text = "text" + case singleSelect = "single_select" + case number = "number" + case date = "date" + } + /// The data type of the issue field + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/data_type`. + public var dataType: Components.Schemas.IssueFieldValue.DataTypePayload + /// The value of the issue field + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/value`. + public struct ValuePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue-field-value/value/value1`. + public var value1: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-field-value/value/value2`. + public var value2: Swift.Double? + /// - Remark: Generated from `#/components/schemas/issue-field-value/value/value3`. + public var value3: Swift.Int? + /// Creates a new `ValuePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + /// - value3: + public init( + value1: Swift.String? = nil, + value2: Swift.Double? = nil, + value3: Swift.Int? = nil + ) { + self.value1 = value1 + self.value2 = value2 + self.value3 = value3 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value3 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2, + self.value3 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2, + self.value3 + ]) + } + } + /// The value of the issue field + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/value`. + public var value: Components.Schemas.IssueFieldValue.ValuePayload? + /// Details about the selected option (only present for single_select fields) + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`. + public struct SingleSelectOptionPayload: Codable, Hashable, Sendable { + /// Unique identifier for the option. + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/id`. + public var id: Swift.Int64 + /// The name of the option + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/name`. + public var name: Swift.String + /// The color of the option + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option/color`. + public var color: Swift.String + /// Creates a new `SingleSelectOptionPayload`. + /// + /// - Parameters: + /// - id: Unique identifier for the option. + /// - name: The name of the option + /// - color: The color of the option + public init( + id: Swift.Int64, + name: Swift.String, + color: Swift.String + ) { + self.id = id + self.name = name + self.color = color + } + public enum CodingKeys: String, CodingKey { + case id + case name + case color + } + } + /// Details about the selected option (only present for single_select fields) + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/single_select_option`. + public var singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload? + /// Creates a new `IssueFieldValue`. + /// + /// - Parameters: + /// - issueFieldId: Unique identifier for the issue field. + /// - nodeId: + /// - dataType: The data type of the issue field + /// - value: The value of the issue field + /// - singleSelectOption: Details about the selected option (only present for single_select fields) + public init( + issueFieldId: Swift.Int64, + nodeId: Swift.String, + dataType: Components.Schemas.IssueFieldValue.DataTypePayload, + value: Components.Schemas.IssueFieldValue.ValuePayload? = nil, + singleSelectOption: Components.Schemas.IssueFieldValue.SingleSelectOptionPayload? = nil + ) { + self.issueFieldId = issueFieldId + self.nodeId = nodeId + self.dataType = dataType + self.value = value + self.singleSelectOption = singleSelectOption + } + public enum CodingKeys: String, CodingKey { + case issueFieldId = "issue_field_id" + case nodeId = "node_id" + case dataType = "data_type" + case value + case singleSelectOption = "single_select_option" + } + } + /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + /// + /// - Remark: Generated from `#/components/schemas/issue`. + public struct Issue: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue/id`. + public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/issue/node_id`. + public var nodeId: Swift.String + /// URL for the issue + /// + /// - Remark: Generated from `#/components/schemas/issue/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/issue/repository_url`. + public var repositoryUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/issue/labels_url`. + public var labelsUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/issue/comments_url`. + public var commentsUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/issue/events_url`. + public var eventsUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/issue/html_url`. + public var htmlUrl: Swift.String + /// Number uniquely identifying the issue within its repository + /// + /// - Remark: Generated from `#/components/schemas/issue/number`. + public var number: Swift.Int + /// State of the issue; either 'open' or 'closed' + /// + /// - Remark: Generated from `#/components/schemas/issue/state`. + public var state: Swift.String + /// The reason for the current state + /// + /// - Remark: Generated from `#/components/schemas/issue/state_reason`. + @frozen public enum StateReasonPayload: String, Codable, Hashable, Sendable, CaseIterable { + case completed = "completed" + case reopened = "reopened" + case notPlanned = "not_planned" + case duplicate = "duplicate" + } + /// The reason for the current state + /// + /// - Remark: Generated from `#/components/schemas/issue/state_reason`. + public var stateReason: Components.Schemas.Issue.StateReasonPayload? + /// Title of the issue + /// + /// - Remark: Generated from `#/components/schemas/issue/title`. + public var title: Swift.String + /// Contents of the issue + /// + /// - Remark: Generated from `#/components/schemas/issue/body`. + public var body: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/user`. + public var user: Components.Schemas.NullableSimpleUser? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload`. + @frozen public enum LabelsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2`. + public struct Case2Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/id`. + public var id: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/node_id`. + public var nodeId: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/color`. + public var color: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2/default`. + public var _default: Swift.Bool? + /// Creates a new `Case2Payload`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - name: + /// - description: + /// - color: + /// - _default: + public init( + id: Swift.Int64? = nil, + nodeId: Swift.String? = nil, + url: Swift.String? = nil, + name: Swift.String? = nil, + description: Swift.String? = nil, + color: Swift.String? = nil, + _default: Swift.Bool? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.name = name + self.description = description + self.color = color + self._default = _default + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case name + case description + case color + case _default = "default" + } + } + /// - Remark: Generated from `#/components/schemas/issue/LabelsPayload/case2`. + case case2(Components.Schemas.Issue.LabelsPayloadPayload.Case2Payload) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try value.encode(to: encoder) + } + } + } + /// Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + /// + /// - Remark: Generated from `#/components/schemas/issue/labels`. + public typealias LabelsPayload = [Components.Schemas.Issue.LabelsPayloadPayload] + /// Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + /// + /// - Remark: Generated from `#/components/schemas/issue/labels`. + public var labels: Components.Schemas.Issue.LabelsPayload + /// - Remark: Generated from `#/components/schemas/issue/assignee`. + public var assignee: Components.Schemas.NullableSimpleUser? + /// - Remark: Generated from `#/components/schemas/issue/assignees`. + public var assignees: [Components.Schemas.SimpleUser]? + /// - Remark: Generated from `#/components/schemas/issue/milestone`. + public var milestone: Components.Schemas.NullableMilestone? + /// - Remark: Generated from `#/components/schemas/issue/locked`. + public var locked: Swift.Bool + /// - Remark: Generated from `#/components/schemas/issue/active_lock_reason`. + public var activeLockReason: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/comments`. + public var comments: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue/pull_request`. + public struct PullRequestPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue/pull_request/merged_at`. + public var mergedAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/issue/pull_request/diff_url`. + public var diffUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/pull_request/html_url`. + public var htmlUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/pull_request/patch_url`. + public var patchUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/pull_request/url`. + public var url: Swift.String? + /// Creates a new `PullRequestPayload`. + /// + /// - Parameters: + /// - mergedAt: + /// - diffUrl: + /// - htmlUrl: + /// - patchUrl: + /// - url: + public init( + mergedAt: Foundation.Date? = nil, + diffUrl: Swift.String? = nil, + htmlUrl: Swift.String? = nil, + patchUrl: Swift.String? = nil, + url: Swift.String? = nil + ) { + self.mergedAt = mergedAt + self.diffUrl = diffUrl + self.htmlUrl = htmlUrl + self.patchUrl = patchUrl + self.url = url + } + public enum CodingKeys: String, CodingKey { + case mergedAt = "merged_at" + case diffUrl = "diff_url" + case htmlUrl = "html_url" + case patchUrl = "patch_url" + case url + } + } + /// - Remark: Generated from `#/components/schemas/issue/pull_request`. + public var pullRequest: Components.Schemas.Issue.PullRequestPayload? + /// - Remark: Generated from `#/components/schemas/issue/closed_at`. + public var closedAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/issue/created_at`. + public var createdAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/issue/updated_at`. + public var updatedAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/issue/draft`. + public var draft: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/issue/closed_by`. + public var closedBy: Components.Schemas.NullableSimpleUser? + /// - Remark: Generated from `#/components/schemas/issue/body_html`. + public var bodyHtml: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/body_text`. + public var bodyText: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/timeline_url`. + public var timelineUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/type`. + public var _type: Components.Schemas.IssueType? + /// - Remark: Generated from `#/components/schemas/issue/repository`. + public var repository: Components.Schemas.Repository? + /// - Remark: Generated from `#/components/schemas/issue/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/issue/author_association`. + public var authorAssociation: Components.Schemas.AuthorAssociation? + /// - Remark: Generated from `#/components/schemas/issue/reactions`. + public var reactions: Components.Schemas.ReactionRollup? + /// - Remark: Generated from `#/components/schemas/issue/sub_issues_summary`. + public var subIssuesSummary: Components.Schemas.SubIssuesSummary? + /// URL to get the parent issue of this issue, if it is a sub-issue + /// + /// - Remark: Generated from `#/components/schemas/issue/parent_issue_url`. + public var parentIssueUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue/issue_dependencies_summary`. + public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? + /// - Remark: Generated from `#/components/schemas/issue/issue_field_values`. + public var issueFieldValues: [Components.Schemas.IssueFieldValue]? + /// Creates a new `Issue`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: URL for the issue + /// - repositoryUrl: + /// - labelsUrl: + /// - commentsUrl: + /// - eventsUrl: /// - htmlUrl: + /// - number: Number uniquely identifying the issue within its repository + /// - state: State of the issue; either 'open' or 'closed' + /// - stateReason: The reason for the current state + /// - title: Title of the issue + /// - body: Contents of the issue + /// - user: + /// - labels: Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + /// - assignee: + /// - assignees: + /// - milestone: + /// - locked: + /// - activeLockReason: + /// - comments: + /// - pullRequest: + /// - closedAt: + /// - createdAt: + /// - updatedAt: + /// - draft: + /// - closedBy: + /// - bodyHtml: + /// - bodyText: + /// - timelineUrl: + /// - _type: + /// - repository: + /// - performedViaGithubApp: + /// - authorAssociation: + /// - reactions: + /// - subIssuesSummary: + /// - parentIssueUrl: URL to get the parent issue of this issue, if it is a sub-issue + /// - issueDependenciesSummary: + /// - issueFieldValues: public init( - key: Swift.String, - name: Swift.String, + id: Swift.Int64, + nodeId: Swift.String, url: Swift.String, + repositoryUrl: Swift.String, + labelsUrl: Swift.String, + commentsUrl: Swift.String, + eventsUrl: Swift.String, + htmlUrl: Swift.String, + number: Swift.Int, + state: Swift.String, + stateReason: Components.Schemas.Issue.StateReasonPayload? = nil, + title: Swift.String, body: Swift.String? = nil, - htmlUrl: Swift.String? = nil + user: Components.Schemas.NullableSimpleUser? = nil, + labels: Components.Schemas.Issue.LabelsPayload, + assignee: Components.Schemas.NullableSimpleUser? = nil, + assignees: [Components.Schemas.SimpleUser]? = nil, + milestone: Components.Schemas.NullableMilestone? = nil, + locked: Swift.Bool, + activeLockReason: Swift.String? = nil, + comments: Swift.Int, + pullRequest: Components.Schemas.Issue.PullRequestPayload? = nil, + closedAt: Foundation.Date? = nil, + createdAt: Foundation.Date, + updatedAt: Foundation.Date, + draft: Swift.Bool? = nil, + closedBy: Components.Schemas.NullableSimpleUser? = nil, + bodyHtml: Swift.String? = nil, + bodyText: Swift.String? = nil, + timelineUrl: Swift.String? = nil, + _type: Components.Schemas.IssueType? = nil, + repository: Components.Schemas.Repository? = nil, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + authorAssociation: Components.Schemas.AuthorAssociation? = nil, + reactions: Components.Schemas.ReactionRollup? = nil, + subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil, + parentIssueUrl: Swift.String? = nil, + issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil, + issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil ) { - self.key = key - self.name = name + self.id = id + self.nodeId = nodeId self.url = url - self.body = body + self.repositoryUrl = repositoryUrl + self.labelsUrl = labelsUrl + self.commentsUrl = commentsUrl + self.eventsUrl = eventsUrl self.htmlUrl = htmlUrl + self.number = number + self.state = state + self.stateReason = stateReason + self.title = title + self.body = body + self.user = user + self.labels = labels + self.assignee = assignee + self.assignees = assignees + self.milestone = milestone + self.locked = locked + self.activeLockReason = activeLockReason + self.comments = comments + self.pullRequest = pullRequest + self.closedAt = closedAt + self.createdAt = createdAt + self.updatedAt = updatedAt + self.draft = draft + self.closedBy = closedBy + self.bodyHtml = bodyHtml + self.bodyText = bodyText + self.timelineUrl = timelineUrl + self._type = _type + self.repository = repository + self.performedViaGithubApp = performedViaGithubApp + self.authorAssociation = authorAssociation + self.reactions = reactions + self.subIssuesSummary = subIssuesSummary + self.parentIssueUrl = parentIssueUrl + self.issueDependenciesSummary = issueDependenciesSummary + self.issueFieldValues = issueFieldValues } public enum CodingKeys: String, CodingKey { - case key - case name + case id + case nodeId = "node_id" case url - case body + case repositoryUrl = "repository_url" + case labelsUrl = "labels_url" + case commentsUrl = "comments_url" + case eventsUrl = "events_url" case htmlUrl = "html_url" + case number + case state + case stateReason = "state_reason" + case title + case body + case user + case labels + case assignee + case assignees + case milestone + case locked + case activeLockReason = "active_lock_reason" + case comments + case pullRequest = "pull_request" + case closedAt = "closed_at" + case createdAt = "created_at" + case updatedAt = "updated_at" + case draft + case closedBy = "closed_by" + case bodyHtml = "body_html" + case bodyText = "body_text" + case timelineUrl = "timeline_url" + case _type = "type" + case repository + case performedViaGithubApp = "performed_via_github_app" + case authorAssociation = "author_association" + case reactions + case subIssuesSummary = "sub_issues_summary" + case parentIssueUrl = "parent_issue_url" + case issueDependenciesSummary = "issue_dependencies_summary" + case issueFieldValues = "issue_field_values" } } - /// Actor + /// Comments provide a way for people to collaborate on an issue. /// - /// - Remark: Generated from `#/components/schemas/actor`. - public struct Actor: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/actor/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/actor/login`. - public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/actor/display_login`. - public var displayLogin: Swift.String? - /// - Remark: Generated from `#/components/schemas/actor/gravatar_id`. - public var gravatarId: Swift.String? - /// - Remark: Generated from `#/components/schemas/actor/url`. + /// - Remark: Generated from `#/components/schemas/issue-comment`. + public struct IssueComment: Codable, Hashable, Sendable { + /// Unique identifier of the issue comment + /// + /// - Remark: Generated from `#/components/schemas/issue-comment/id`. + public var id: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/issue-comment/node_id`. + public var nodeId: Swift.String + /// URL for the issue comment + /// + /// - Remark: Generated from `#/components/schemas/issue-comment/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/actor/avatar_url`. - public var avatarUrl: Swift.String - /// Creates a new `Actor`. + /// Contents of the issue comment + /// + /// - Remark: Generated from `#/components/schemas/issue-comment/body`. + public var body: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-comment/body_text`. + public var bodyText: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-comment/body_html`. + public var bodyHtml: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-comment/html_url`. + public var htmlUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-comment/user`. + public var user: Components.Schemas.NullableSimpleUser? + /// - Remark: Generated from `#/components/schemas/issue-comment/created_at`. + public var createdAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/issue-comment/updated_at`. + public var updatedAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/issue-comment/issue_url`. + public var issueUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-comment/author_association`. + public var authorAssociation: Components.Schemas.AuthorAssociation + /// - Remark: Generated from `#/components/schemas/issue-comment/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/issue-comment/reactions`. + public var reactions: Components.Schemas.ReactionRollup? + /// Creates a new `IssueComment`. /// /// - Parameters: - /// - id: - /// - login: - /// - displayLogin: - /// - gravatarId: - /// - url: - /// - avatarUrl: + /// - id: Unique identifier of the issue comment + /// - nodeId: + /// - url: URL for the issue comment + /// - body: Contents of the issue comment + /// - bodyText: + /// - bodyHtml: + /// - htmlUrl: + /// - user: + /// - createdAt: + /// - updatedAt: + /// - issueUrl: + /// - authorAssociation: + /// - performedViaGithubApp: + /// - reactions: public init( - id: Swift.Int, - login: Swift.String, - displayLogin: Swift.String? = nil, - gravatarId: Swift.String? = nil, + id: Swift.Int64, + nodeId: Swift.String, url: Swift.String, - avatarUrl: Swift.String + body: Swift.String? = nil, + bodyText: Swift.String? = nil, + bodyHtml: Swift.String? = nil, + htmlUrl: Swift.String, + user: Components.Schemas.NullableSimpleUser? = nil, + createdAt: Foundation.Date, + updatedAt: Foundation.Date, + issueUrl: Swift.String, + authorAssociation: Components.Schemas.AuthorAssociation, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + reactions: Components.Schemas.ReactionRollup? = nil ) { self.id = id - self.login = login - self.displayLogin = displayLogin - self.gravatarId = gravatarId + self.nodeId = nodeId self.url = url - self.avatarUrl = avatarUrl + self.body = body + self.bodyText = bodyText + self.bodyHtml = bodyHtml + self.htmlUrl = htmlUrl + self.user = user + self.createdAt = createdAt + self.updatedAt = updatedAt + self.issueUrl = issueUrl + self.authorAssociation = authorAssociation + self.performedViaGithubApp = performedViaGithubApp + self.reactions = reactions } public enum CodingKeys: String, CodingKey { case id - case login - case displayLogin = "display_login" - case gravatarId = "gravatar_id" + case nodeId = "node_id" case url - case avatarUrl = "avatar_url" + case body + case bodyText = "body_text" + case bodyHtml = "body_html" + case htmlUrl = "html_url" + case user + case createdAt = "created_at" + case updatedAt = "updated_at" + case issueUrl = "issue_url" + case authorAssociation = "author_association" + case performedViaGithubApp = "performed_via_github_app" + case reactions } } /// Event @@ -2262,178 +3617,87 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/event/org`. public var org: Components.Schemas.Actor? /// - Remark: Generated from `#/components/schemas/event/payload`. - @frozen public enum PayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/event/payload/case1`. - case case1(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case2`. - case case2(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case3`. - case case3(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case4`. - case case4(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case5`. - case case5(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case6`. - case case6(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case7`. - case case7(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case8`. - case case8(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case9`. - case case9(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case10`. - case case10(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case11`. - case case11(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case12`. - case case12(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case13`. - case case13(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case14`. - case case14(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case15`. - case case15(OpenAPIRuntime.OpenAPIValueContainer) - /// - Remark: Generated from `#/components/schemas/event/payload/case16`. - case case16(OpenAPIRuntime.OpenAPIValueContainer) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case3(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case4(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case5(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case6(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case7(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case8(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case9(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case10(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case11(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case12(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case13(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case14(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case15(try .init(from: decoder)) - return - } catch { - errors.append(error) + public struct PayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/event/payload/action`. + public var action: Swift.String? + /// - Remark: Generated from `#/components/schemas/event/payload/issue`. + public var issue: Components.Schemas.Issue? + /// - Remark: Generated from `#/components/schemas/event/payload/comment`. + public var comment: Components.Schemas.IssueComment? + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload`. + public struct PagesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload/page_name`. + public var pageName: Swift.String? + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload/title`. + public var title: Swift.String? + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload/summary`. + public var summary: Swift.String? + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload/action`. + public var action: Swift.String? + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload/sha`. + public var sha: Swift.String? + /// - Remark: Generated from `#/components/schemas/event/payload/PagesPayload/html_url`. + public var htmlUrl: Swift.String? + /// Creates a new `PagesPayloadPayload`. + /// + /// - Parameters: + /// - pageName: + /// - title: + /// - summary: + /// - action: + /// - sha: + /// - htmlUrl: + public init( + pageName: Swift.String? = nil, + title: Swift.String? = nil, + summary: Swift.String? = nil, + action: Swift.String? = nil, + sha: Swift.String? = nil, + htmlUrl: Swift.String? = nil + ) { + self.pageName = pageName + self.title = title + self.summary = summary + self.action = action + self.sha = sha + self.htmlUrl = htmlUrl } - do { - self = .case16(try .init(from: decoder)) - return - } catch { - errors.append(error) + public enum CodingKeys: String, CodingKey { + case pageName = "page_name" + case title + case summary + case action + case sha + case htmlUrl = "html_url" } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try value.encode(to: encoder) - case let .case3(value): - try value.encode(to: encoder) - case let .case4(value): - try value.encode(to: encoder) - case let .case5(value): - try value.encode(to: encoder) - case let .case6(value): - try value.encode(to: encoder) - case let .case7(value): - try value.encode(to: encoder) - case let .case8(value): - try value.encode(to: encoder) - case let .case9(value): - try value.encode(to: encoder) - case let .case10(value): - try value.encode(to: encoder) - case let .case11(value): - try value.encode(to: encoder) - case let .case12(value): - try value.encode(to: encoder) - case let .case13(value): - try value.encode(to: encoder) - case let .case14(value): - try value.encode(to: encoder) - case let .case15(value): - try value.encode(to: encoder) - case let .case16(value): - try value.encode(to: encoder) - } + /// - Remark: Generated from `#/components/schemas/event/payload/pages`. + public typealias PagesPayload = [Components.Schemas.Event.PayloadPayload.PagesPayloadPayload] + /// - Remark: Generated from `#/components/schemas/event/payload/pages`. + public var pages: Components.Schemas.Event.PayloadPayload.PagesPayload? + /// Creates a new `PayloadPayload`. + /// + /// - Parameters: + /// - action: + /// - issue: + /// - comment: + /// - pages: + public init( + action: Swift.String? = nil, + issue: Components.Schemas.Issue? = nil, + comment: Components.Schemas.IssueComment? = nil, + pages: Components.Schemas.Event.PayloadPayload.PagesPayload? = nil + ) { + self.action = action + self.issue = issue + self.comment = comment + self.pages = pages + } + public enum CodingKeys: String, CodingKey { + case action + case issue + case comment + case pages } } /// - Remark: Generated from `#/components/schemas/event/payload`. @@ -3806,6 +5070,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = 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/public-events-per-page`. @@ -3834,10 +5102,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/thread-id`. public typealias ThreadId = Swift.Int - /// The organization name. The name is not case sensitive. - /// - /// - Remark: Generated from `#/components/parameters/org`. - public typealias Org = Swift.String /// The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. /// /// - Remark: Generated from `#/components/parameters/sort-starred`. From cd0d40b58d53b6e6b60bc0de4b701d1a765b64d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:57:10 +0000 Subject: [PATCH 04/28] Commit via running: make Sources/apps --- Sources/apps/Types.swift | 41 +++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/Sources/apps/Types.swift b/Sources/apps/Types.swift index 63955dd256..5e7f4791eb 100644 --- a/Sources/apps/Types.swift +++ b/Sources/apps/Types.swift @@ -2487,6 +2487,17 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/workflows`. public var workflows: Components.Schemas.AppPermissions.WorkflowsPayload? + /// The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/custom_properties_for_organizations`. + @frozen public enum CustomPropertiesForOrganizationsPayload: String, Codable, Hashable, Sendable, CaseIterable { + case read = "read" + case write = "write" + } + /// The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/custom_properties_for_organizations`. + public var customPropertiesForOrganizations: Components.Schemas.AppPermissions.CustomPropertiesForOrganizationsPayload? /// The level of permission to grant the access token for organization teams and members. /// /// - Remark: Generated from `#/components/schemas/app-permissions/members`. @@ -2760,6 +2771,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/starring`. public var starring: Components.Schemas.AppPermissions.StarringPayload? + /// The level of permission to grant the access token for organization custom properties management at the enterprise level. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/enterprise_custom_properties_for_organizations`. + @frozen public enum EnterpriseCustomPropertiesForOrganizationsPayload: String, Codable, Hashable, Sendable, CaseIterable { + case read = "read" + case write = "write" + case admin = "admin" + } + /// The level of permission to grant the access token for organization custom properties management at the enterprise level. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/enterprise_custom_properties_for_organizations`. + public var enterpriseCustomPropertiesForOrganizations: Components.Schemas.AppPermissions.EnterpriseCustomPropertiesForOrganizationsPayload? /// Creates a new `AppPermissions`. /// /// - Parameters: @@ -2786,6 +2809,7 @@ public enum Components { /// - statuses: The level of permission to grant the access token for commit statuses. /// - vulnerabilityAlerts: The level of permission to grant the access token to manage Dependabot alerts. /// - workflows: The level of permission to grant the access token to update GitHub Actions workflow files. + /// - customPropertiesForOrganizations: The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. /// - members: The level of permission to grant the access token for organization teams and members. /// - organizationAdministration: The level of permission to grant the access token to manage access to an organization. /// - organizationCustomRoles: The level of permission to grant the access token for custom repository roles management. @@ -2811,6 +2835,7 @@ public enum Components { /// - interactionLimits: The level of permission to grant the access token to view and manage interaction limits on a repository. /// - profile: The level of permission to grant the access token to manage the profile settings belonging to a user. /// - starring: The level of permission to grant the access token to list and manage repositories a user is starring. + /// - enterpriseCustomPropertiesForOrganizations: The level of permission to grant the access token for organization custom properties management at the enterprise level. public init( actions: Components.Schemas.AppPermissions.ActionsPayload? = nil, administration: Components.Schemas.AppPermissions.AdministrationPayload? = nil, @@ -2835,6 +2860,7 @@ public enum Components { statuses: Components.Schemas.AppPermissions.StatusesPayload? = nil, vulnerabilityAlerts: Components.Schemas.AppPermissions.VulnerabilityAlertsPayload? = nil, workflows: Components.Schemas.AppPermissions.WorkflowsPayload? = nil, + customPropertiesForOrganizations: Components.Schemas.AppPermissions.CustomPropertiesForOrganizationsPayload? = nil, members: Components.Schemas.AppPermissions.MembersPayload? = nil, organizationAdministration: Components.Schemas.AppPermissions.OrganizationAdministrationPayload? = nil, organizationCustomRoles: Components.Schemas.AppPermissions.OrganizationCustomRolesPayload? = nil, @@ -2859,7 +2885,8 @@ public enum Components { gpgKeys: Components.Schemas.AppPermissions.GpgKeysPayload? = nil, interactionLimits: Components.Schemas.AppPermissions.InteractionLimitsPayload? = nil, profile: Components.Schemas.AppPermissions.ProfilePayload? = nil, - starring: Components.Schemas.AppPermissions.StarringPayload? = nil + starring: Components.Schemas.AppPermissions.StarringPayload? = nil, + enterpriseCustomPropertiesForOrganizations: Components.Schemas.AppPermissions.EnterpriseCustomPropertiesForOrganizationsPayload? = nil ) { self.actions = actions self.administration = administration @@ -2884,6 +2911,7 @@ public enum Components { self.statuses = statuses self.vulnerabilityAlerts = vulnerabilityAlerts self.workflows = workflows + self.customPropertiesForOrganizations = customPropertiesForOrganizations self.members = members self.organizationAdministration = organizationAdministration self.organizationCustomRoles = organizationCustomRoles @@ -2909,6 +2937,7 @@ public enum Components { self.interactionLimits = interactionLimits self.profile = profile self.starring = starring + self.enterpriseCustomPropertiesForOrganizations = enterpriseCustomPropertiesForOrganizations } public enum CodingKeys: String, CodingKey { case actions @@ -2934,6 +2963,7 @@ public enum Components { case statuses case vulnerabilityAlerts = "vulnerability_alerts" case workflows + case customPropertiesForOrganizations = "custom_properties_for_organizations" case members case organizationAdministration = "organization_administration" case organizationCustomRoles = "organization_custom_roles" @@ -2959,6 +2989,7 @@ public enum Components { case interactionLimits = "interaction_limits" case profile case starring + case enterpriseCustomPropertiesForOrganizations = "enterprise_custom_properties_for_organizations" } } /// A GitHub user. @@ -4794,6 +4825,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// account_id parameter /// /// - Remark: Generated from `#/components/parameters/account-id`. @@ -4817,10 +4852,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The unique identifier of the repository. /// /// - Remark: Generated from `#/components/parameters/repository-id`. From 53b0e42ec56494c6ab369ae8ad120a1d65bbdb59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:57:33 +0000 Subject: [PATCH 05/28] Commit via running: make Sources/billing --- Sources/billing/Client.swift | 4 ++++ Sources/billing/Types.swift | 36 ++++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Sources/billing/Client.swift b/Sources/billing/Client.swift index 6aebf40234..1db7191eeb 100644 --- a/Sources/billing/Client.swift +++ b/Sources/billing/Client.swift @@ -42,6 +42,8 @@ public struct Client: APIProtocol { /// /// Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /organizations/{org}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-org)`. public func billingGetGithubBillingPremiumRequestUsageReportOrg(_ input: Operations.BillingGetGithubBillingPremiumRequestUsageReportOrg.Input) async throws -> Operations.BillingGetGithubBillingPremiumRequestUsageReportOrg.Output { @@ -798,6 +800,8 @@ public struct Client: APIProtocol { /// /// Gets a report of premium request usage for a user. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /users/{username}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//users/{username}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-user)`. public func billingGetGithubBillingPremiumRequestUsageReportUser(_ input: Operations.BillingGetGithubBillingPremiumRequestUsageReportUser.Input) async throws -> Operations.BillingGetGithubBillingPremiumRequestUsageReportUser.Output { diff --git a/Sources/billing/Types.swift b/Sources/billing/Types.swift index 3a2e0454e0..8fca4b3df4 100644 --- a/Sources/billing/Types.swift +++ b/Sources/billing/Types.swift @@ -15,6 +15,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /organizations/{org}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-org)`. func billingGetGithubBillingPremiumRequestUsageReportOrg(_ input: Operations.BillingGetGithubBillingPremiumRequestUsageReportOrg.Input) async throws -> Operations.BillingGetGithubBillingPremiumRequestUsageReportOrg.Output @@ -86,6 +88,8 @@ public protocol APIProtocol: Sendable { /// /// Gets a report of premium request usage for a user. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /users/{username}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//users/{username}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-user)`. func billingGetGithubBillingPremiumRequestUsageReportUser(_ input: Operations.BillingGetGithubBillingPremiumRequestUsageReportUser.Input) async throws -> Operations.BillingGetGithubBillingPremiumRequestUsageReportUser.Output @@ -117,6 +121,8 @@ extension APIProtocol { /// /// Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /organizations/{org}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-org)`. public func billingGetGithubBillingPremiumRequestUsageReportOrg( @@ -248,6 +254,8 @@ extension APIProtocol { /// /// Gets a report of premium request usage for a user. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /users/{username}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//users/{username}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-user)`. public func billingGetGithubBillingPremiumRequestUsageReportUser( @@ -490,7 +498,7 @@ public enum Components { /// Gross quantity of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-org/UsageItemsPayload/grossQuantity`. - public var grossQuantity: Swift.Int + public var grossQuantity: Swift.Double /// Gross amount of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-org/UsageItemsPayload/grossAmount`. @@ -498,7 +506,7 @@ public enum Components { /// Discount quantity of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-org/UsageItemsPayload/discountQuantity`. - public var discountQuantity: Swift.Int + public var discountQuantity: Swift.Double /// Discount amount of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-org/UsageItemsPayload/discountAmount`. @@ -506,7 +514,7 @@ public enum Components { /// Net quantity of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-org/UsageItemsPayload/netQuantity`. - public var netQuantity: Swift.Int + public var netQuantity: Swift.Double /// Net amount of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-org/UsageItemsPayload/netAmount`. @@ -531,11 +539,11 @@ public enum Components { model: Swift.String, unitType: Swift.String, pricePerUnit: Swift.Double, - grossQuantity: Swift.Int, + grossQuantity: Swift.Double, grossAmount: Swift.Double, - discountQuantity: Swift.Int, + discountQuantity: Swift.Double, discountAmount: Swift.Double, - netQuantity: Swift.Int, + netQuantity: Swift.Double, netAmount: Swift.Double ) { self.product = product @@ -1035,7 +1043,7 @@ public enum Components { /// Gross quantity of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-user/UsageItemsPayload/grossQuantity`. - public var grossQuantity: Swift.Int + public var grossQuantity: Swift.Double /// Gross amount of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-user/UsageItemsPayload/grossAmount`. @@ -1043,7 +1051,7 @@ public enum Components { /// Discount quantity of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-user/UsageItemsPayload/discountQuantity`. - public var discountQuantity: Swift.Int + public var discountQuantity: Swift.Double /// Discount amount of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-user/UsageItemsPayload/discountAmount`. @@ -1051,7 +1059,7 @@ public enum Components { /// Net quantity of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-user/UsageItemsPayload/netQuantity`. - public var netQuantity: Swift.Int + public var netQuantity: Swift.Double /// Net amount of the usage line item. /// /// - Remark: Generated from `#/components/schemas/billing-premium-request-usage-report-user/UsageItemsPayload/netAmount`. @@ -1076,11 +1084,11 @@ public enum Components { model: Swift.String, unitType: Swift.String, pricePerUnit: Swift.Double, - grossQuantity: Swift.Int, + grossQuantity: Swift.Double, grossAmount: Swift.Double, - discountQuantity: Swift.Int, + discountQuantity: Swift.Double, discountAmount: Swift.Double, - netQuantity: Swift.Int, + netQuantity: Swift.Double, netAmount: Swift.Double ) { self.product = product @@ -1614,6 +1622,8 @@ public enum Operations { /// /// Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /organizations/{org}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//organizations/{org}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-org)`. public enum BillingGetGithubBillingPremiumRequestUsageReportOrg { @@ -2819,6 +2829,8 @@ public enum Operations { /// /// Gets a report of premium request usage for a user. /// + /// **Note:** Only data from the past 24 months is accessible via this endpoint. + /// /// - Remark: HTTP `GET /users/{username}/settings/billing/premium_request/usage`. /// - Remark: Generated from `#/paths//users/{username}/settings/billing/premium_request/usage/get(billing/get-github-billing-premium-request-usage-report-user)`. public enum BillingGetGithubBillingPremiumRequestUsageReportUser { From 61faa1e48b4fb12f89d09333d070b61bf842312b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:57:56 +0000 Subject: [PATCH 06/28] Commit via running: make Sources/checks --- Sources/checks/Types.swift | 314 ++++++++++++++++++------------------- 1 file changed, 157 insertions(+), 157 deletions(-) diff --git a/Sources/checks/Types.swift b/Sources/checks/Types.swift index 4e53748b79..8d870a6c47 100644 --- a/Sources/checks/Types.swift +++ b/Sources/checks/Types.swift @@ -972,163 +972,6 @@ public enum Components { case installationsCount = "installations_count" } } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. - public struct PullRequestMinimal: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. - 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`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. - public struct HeadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/ref`. - public var ref: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/sha`. - public var sha: Swift.String - /// - 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.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`. - public var name: Swift.String - /// Creates a new `RepoPayload`. - /// - /// - Parameters: - /// - id: - /// - url: - /// - name: - public init( - id: Swift.Int64, - url: Swift.String, - name: Swift.String - ) { - self.id = id - self.url = url - self.name = name - } - public enum CodingKeys: String, CodingKey { - case id - case url - case name - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. - public var repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload - /// Creates a new `HeadPayload`. - /// - /// - Parameters: - /// - ref: - /// - sha: - /// - repo: - public init( - ref: Swift.String, - sha: Swift.String, - repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload - ) { - self.ref = ref - self.sha = sha - self.repo = repo - } - public enum CodingKeys: String, CodingKey { - case ref - case sha - case repo - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. - public var head: Components.Schemas.PullRequestMinimal.HeadPayload - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. - public struct BasePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/ref`. - public var ref: Swift.String - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/sha`. - public var sha: Swift.String - /// - 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.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`. - public var name: Swift.String - /// Creates a new `RepoPayload`. - /// - /// - Parameters: - /// - id: - /// - url: - /// - name: - public init( - id: Swift.Int64, - url: Swift.String, - name: Swift.String - ) { - self.id = id - self.url = url - self.name = name - } - public enum CodingKeys: String, CodingKey { - case id - case url - case name - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. - public var repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload - /// Creates a new `BasePayload`. - /// - /// - Parameters: - /// - ref: - /// - sha: - /// - repo: - public init( - ref: Swift.String, - sha: Swift.String, - repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload - ) { - self.ref = ref - self.sha = sha - self.repo = repo - } - public enum CodingKeys: String, CodingKey { - case ref - case sha - case repo - } - } - /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. - public var base: Components.Schemas.PullRequestMinimal.BasePayload - /// Creates a new `PullRequestMinimal`. - /// - /// - Parameters: - /// - id: - /// - number: - /// - url: - /// - head: - /// - base: - public init( - id: Swift.Int64, - number: Swift.Int, - url: Swift.String, - head: Components.Schemas.PullRequestMinimal.HeadPayload, - base: Components.Schemas.PullRequestMinimal.BasePayload - ) { - self.id = id - self.number = number - self.url = url - self.head = head - self.base = base - } - public enum CodingKeys: String, CodingKey { - case id - case number - case url - case head - case base - } - } /// - Remark: Generated from `#/components/schemas/security-and-analysis`. public struct SecurityAndAnalysis: Codable, Hashable, Sendable { /// Enable or disable GitHub Advanced Security for the repository. @@ -1997,6 +1840,163 @@ public enum Components { try decoder.ensureNoAdditionalProperties(knownKeys: []) } } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. + public struct PullRequestMinimal: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/id`. + 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`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. + public struct HeadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/ref`. + public var ref: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/sha`. + public var sha: Swift.String + /// - 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.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`. + public var name: Swift.String + /// Creates a new `RepoPayload`. + /// + /// - Parameters: + /// - id: + /// - url: + /// - name: + public init( + id: Swift.Int64, + url: Swift.String, + name: Swift.String + ) { + self.id = id + self.url = url + self.name = name + } + public enum CodingKeys: String, CodingKey { + case id + case url + case name + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head/repo`. + public var repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload + /// Creates a new `HeadPayload`. + /// + /// - Parameters: + /// - ref: + /// - sha: + /// - repo: + public init( + ref: Swift.String, + sha: Swift.String, + repo: Components.Schemas.PullRequestMinimal.HeadPayload.RepoPayload + ) { + self.ref = ref + self.sha = sha + self.repo = repo + } + public enum CodingKeys: String, CodingKey { + case ref + case sha + case repo + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/head`. + public var head: Components.Schemas.PullRequestMinimal.HeadPayload + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. + public struct BasePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/ref`. + public var ref: Swift.String + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/sha`. + public var sha: Swift.String + /// - 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.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`. + public var name: Swift.String + /// Creates a new `RepoPayload`. + /// + /// - Parameters: + /// - id: + /// - url: + /// - name: + public init( + id: Swift.Int64, + url: Swift.String, + name: Swift.String + ) { + self.id = id + self.url = url + self.name = name + } + public enum CodingKeys: String, CodingKey { + case id + case url + case name + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base/repo`. + public var repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload + /// Creates a new `BasePayload`. + /// + /// - Parameters: + /// - ref: + /// - sha: + /// - repo: + public init( + ref: Swift.String, + sha: Swift.String, + repo: Components.Schemas.PullRequestMinimal.BasePayload.RepoPayload + ) { + self.ref = ref + self.sha = sha + self.repo = repo + } + public enum CodingKeys: String, CodingKey { + case ref + case sha + case repo + } + } + /// - Remark: Generated from `#/components/schemas/pull-request-minimal/base`. + public var base: Components.Schemas.PullRequestMinimal.BasePayload + /// Creates a new `PullRequestMinimal`. + /// + /// - Parameters: + /// - id: + /// - number: + /// - url: + /// - head: + /// - base: + public init( + id: Swift.Int64, + number: Swift.Int, + url: Swift.String, + head: Components.Schemas.PullRequestMinimal.HeadPayload, + base: Components.Schemas.PullRequestMinimal.BasePayload + ) { + self.id = id + self.number = number + self.url = url + self.head = head + self.base = base + } + public enum CodingKeys: String, CodingKey { + case id + case number + case url + case head + case base + } + } /// A deployment created as the result of an Actions check run from a workflow that references an environment /// /// - Remark: Generated from `#/components/schemas/deployment-simple`. From 36f0ba43187bc1256add61386163500c276b714c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:58:19 +0000 Subject: [PATCH 07/28] Commit via running: make Sources/code-scanning --- Sources/code-scanning/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index 6d940e2acb..4328222bbc 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -3647,6 +3647,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias Page = Swift.Int + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -3655,10 +3659,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. /// /// - Remark: Generated from `#/components/parameters/tool-name`. From 96f21c568821be730a52f8e7450670809af6addb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 00:59:28 +0000 Subject: [PATCH 08/28] Commit via running: make Sources/dependabot --- Sources/dependabot/Client.swift | 49 -------------------- Sources/dependabot/Types.swift | 82 ++------------------------------- 2 files changed, 4 insertions(+), 127 deletions(-) diff --git a/Sources/dependabot/Client.swift b/Sources/dependabot/Client.swift index 1559c1fdb6..96fe48e822 100644 --- a/Sources/dependabot/Client.swift +++ b/Sources/dependabot/Client.swift @@ -143,20 +143,6 @@ public struct Client: APIProtocol { name: "after", value: input.query.after ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "first", - value: input.query.first - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "last", - value: input.query.last - ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -735,20 +721,6 @@ public struct Client: APIProtocol { name: "after", value: input.query.after ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "first", - value: input.query.first - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "last", - value: input.query.last - ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -1567,13 +1539,6 @@ public struct Client: APIProtocol { name: "direction", value: input.query.direction ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "page", - value: input.query.page - ) try converter.setQueryItemAsURI( in: &request, style: .form, @@ -1595,20 +1560,6 @@ public struct Client: APIProtocol { name: "after", value: input.query.after ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "first", - value: input.query.first - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "last", - value: input.query.last - ) converter.setAcceptHeader( in: &request.headerFields, contentTypes: input.headers.accept diff --git a/Sources/dependabot/Types.swift b/Sources/dependabot/Types.swift index 1cd6495e12..56d7e77aca 100644 --- a/Sources/dependabot/Types.swift +++ b/Sources/dependabot/Types.swift @@ -4284,18 +4284,10 @@ public enum Components { case updated = "updated" case epssPercentage = "epss_percentage" } - /// **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// This parameter must not be used in combination with `last`. - /// Instead, use `per_page` in combination with `after` to fetch the first page of results. - /// - /// - Remark: Generated from `#/components/parameters/pagination-first`. - public typealias PaginationFirst = Swift.Int - /// **Deprecated**. The number of results per page (max 100), starting from the last matching result. - /// This parameter must not be used in combination with `first`. - /// Instead, use `per_page` in combination with `before` to fetch the last page of results. + /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/components/parameters/pagination-last`. - public typealias PaginationLast = Swift.Int + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -4304,10 +4296,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The name of the secret. /// /// - Remark: Generated from `#/components/parameters/secret-name`. @@ -4715,18 +4703,6 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/after`. public var after: Components.Parameters.PaginationAfter? - /// **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// This parameter must not be used in combination with `last`. - /// Instead, use `per_page` in combination with `after` to fetch the first page of results. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/first`. - public var first: Components.Parameters.PaginationFirst? - /// **Deprecated**. The number of results per page (max 100), starting from the last matching result. - /// This parameter must not be used in combination with `first`. - /// Instead, use `per_page` in combination with `before` to fetch the last page of results. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/dependabot/alerts/GET/query/last`. - public var last: Components.Parameters.PaginationLast? /// 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}/dependabot/alerts/GET/query/per_page`. @@ -4745,8 +4721,6 @@ public enum Operations { /// - direction: The direction to sort the results by. /// - 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)." - /// - first: **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// - last: **Deprecated**. The number of results per page (max 100), starting from the last matching result. /// - perPage: 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( state: Components.Parameters.DependabotAlertCommaSeparatedStates? = nil, @@ -4760,8 +4734,6 @@ public enum Operations { direction: Components.Parameters.Direction? = nil, before: Components.Parameters.PaginationBefore? = nil, after: Components.Parameters.PaginationAfter? = nil, - first: Components.Parameters.PaginationFirst? = nil, - last: Components.Parameters.PaginationLast? = nil, perPage: Components.Parameters.PerPage? = nil ) { self.state = state @@ -4775,8 +4747,6 @@ public enum Operations { self.direction = direction self.before = before self.after = after - self.first = first - self.last = last self.perPage = perPage } } @@ -5774,18 +5744,6 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/after`. public var after: Components.Parameters.PaginationAfter? - /// **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// This parameter must not be used in combination with `last`. - /// Instead, use `per_page` in combination with `after` to fetch the first page of results. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/first`. - public var first: Components.Parameters.PaginationFirst? - /// **Deprecated**. The number of results per page (max 100), starting from the last matching result. - /// This parameter must not be used in combination with `first`. - /// Instead, use `per_page` in combination with `before` to fetch the last page of results. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/dependabot/alerts/GET/query/last`. - public var last: Components.Parameters.PaginationLast? /// 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}/dependabot/alerts/GET/query/per_page`. @@ -5807,8 +5765,6 @@ public enum Operations { /// - direction: The direction to sort the results by. /// - 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)." - /// - first: **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// - last: **Deprecated**. The number of results per page (max 100), starting from the last matching result. /// - perPage: 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( state: Components.Parameters.DependabotAlertCommaSeparatedStates? = nil, @@ -5825,8 +5781,6 @@ public enum Operations { direction: Components.Parameters.Direction? = nil, before: Components.Parameters.PaginationBefore? = nil, after: Components.Parameters.PaginationAfter? = nil, - first: Components.Parameters.PaginationFirst? = nil, - last: Components.Parameters.PaginationLast? = nil, perPage: Components.Parameters.PerPage? = nil ) { self.state = state @@ -5843,8 +5797,6 @@ public enum Operations { self.direction = direction self.before = before self.after = after - self.first = first - self.last = last self.perPage = perPage } } @@ -7656,11 +7608,6 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/direction`. public var direction: Components.Parameters.Direction? - /// **Closing down notice**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/page`. - @available(*, deprecated) - public var page: Swift.Int? /// 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}/dependabot/alerts/GET/query/per_page`. @@ -7674,18 +7621,6 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/after`. public var after: Components.Parameters.PaginationAfter? - /// **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// This parameter must not be used in combination with `last`. - /// Instead, use `per_page` in combination with `after` to fetch the first page of results. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/first`. - public var first: Components.Parameters.PaginationFirst? - /// **Deprecated**. The number of results per page (max 100), starting from the last matching result. - /// This parameter must not be used in combination with `first`. - /// Instead, use `per_page` in combination with `before` to fetch the last page of results. - /// - /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/dependabot/alerts/GET/query/last`. - public var last: Components.Parameters.PaginationLast? /// Creates a new `Query`. /// /// - Parameters: @@ -7699,12 +7634,9 @@ public enum Operations { /// - scope: The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. /// - sort: The property by which to sort the results. /// - direction: The direction to sort the results by. - /// - page: **Closing down notice**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. /// - perPage: 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)." - /// - first: **Deprecated**. The number of results per page (max 100), starting from the first matching result. - /// - last: **Deprecated**. The number of results per page (max 100), starting from the last matching result. public init( state: Components.Parameters.DependabotAlertCommaSeparatedStates? = nil, severity: Components.Parameters.DependabotAlertCommaSeparatedSeverities? = nil, @@ -7716,12 +7648,9 @@ public enum Operations { scope: Components.Parameters.DependabotAlertScope? = nil, sort: Components.Parameters.DependabotAlertSort? = nil, direction: Components.Parameters.Direction? = nil, - page: Swift.Int? = nil, perPage: Swift.Int? = nil, before: Components.Parameters.PaginationBefore? = nil, - after: Components.Parameters.PaginationAfter? = nil, - first: Components.Parameters.PaginationFirst? = nil, - last: Components.Parameters.PaginationLast? = nil + after: Components.Parameters.PaginationAfter? = nil ) { self.state = state self.severity = severity @@ -7733,12 +7662,9 @@ public enum Operations { self.scope = scope self.sort = sort self.direction = direction - self.page = page self.perPage = perPage self.before = before self.after = after - self.first = first - self.last = last } } public var query: Operations.DependabotListAlertsForRepo.Input.Query From 745d5051145f79626d0f8504d20b254895a2a707 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:01:23 +0000 Subject: [PATCH 09/28] Commit via running: make Sources/issues --- Sources/issues/Types.swift | 146 ++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 577180c1ca..0f5a480e99 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -3245,73 +3245,6 @@ public enum Components { case codeSearchIndexStatus = "code_search_index_status" } } - /// Color-coded labels help you categorize and filter your issues (just like labels in Gmail). - /// - /// - 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`. - public var nodeId: Swift.String - /// URL for the label - /// - /// - Remark: Generated from `#/components/schemas/label/url`. - public var url: Swift.String - /// The name of the label. - /// - /// - 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: Unique identifier for the label. - /// - nodeId: - /// - url: URL for the label - /// - name: The name of the label. - /// - description: Optional description of the label, such as its purpose. - /// - color: 6-character hex code, without the leading #, identifying the color - /// - _default: Whether this label comes by default in a new repository. - public init( - id: Swift.Int64, - nodeId: Swift.String, - url: Swift.String, - name: Swift.String, - description: Swift.String? = nil, - color: Swift.String, - _default: Swift.Bool - ) { - self.id = id - self.nodeId = nodeId - self.url = url - self.name = name - self.description = description - self.color = color - self._default = _default - } - public enum CodingKeys: String, CodingKey { - case id - case nodeId = "node_id" - case url - case name - case description - case color - case _default = "default" - } - } /// A collection of related issues and pull requests. /// /// - Remark: Generated from `#/components/schemas/nullable-milestone`. @@ -4514,7 +4447,7 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/issue-comment/issue_url`. public var issueUrl: Swift.String /// - Remark: Generated from `#/components/schemas/issue-comment/author_association`. - public var authorAssociation: Components.Schemas.AuthorAssociation? + public var authorAssociation: Components.Schemas.AuthorAssociation /// - Remark: Generated from `#/components/schemas/issue-comment/performed_via_github_app`. public var performedViaGithubApp: Components.Schemas.NullableIntegration? /// - Remark: Generated from `#/components/schemas/issue-comment/reactions`. @@ -4548,7 +4481,7 @@ public enum Components { createdAt: Foundation.Date, updatedAt: Foundation.Date, issueUrl: Swift.String, - authorAssociation: Components.Schemas.AuthorAssociation? = nil, + authorAssociation: Components.Schemas.AuthorAssociation, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil ) { @@ -7345,6 +7278,73 @@ public enum Components { try self.value15?.encode(to: encoder) } } + /// Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + /// + /// - 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`. + public var nodeId: Swift.String + /// URL for the label + /// + /// - Remark: Generated from `#/components/schemas/label/url`. + public var url: Swift.String + /// The name of the label. + /// + /// - 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: Unique identifier for the label. + /// - nodeId: + /// - url: URL for the label + /// - name: The name of the label. + /// - description: Optional description of the label, such as its purpose. + /// - color: 6-character hex code, without the leading #, identifying the color + /// - _default: Whether this label comes by default in a new repository. + public init( + id: Swift.Int64, + nodeId: Swift.String, + url: Swift.String, + name: Swift.String, + description: Swift.String? = nil, + color: Swift.String, + _default: Swift.Bool + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.name = name + self.description = description + self.color = color + self._default = _default + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case name + case description + case color + case _default = "default" + } + } /// Timeline Comment Event /// /// - Remark: Generated from `#/components/schemas/timeline-comment-event`. @@ -8990,6 +8990,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/since`. public typealias Since = Foundation.Date + /// 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 comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. @@ -9013,10 +9017,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The number that identifies the issue. /// /// - Remark: Generated from `#/components/parameters/issue-number`. From afba70d238134116bae079ec688c1b478b177b43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:03:17 +0000 Subject: [PATCH 10/28] Commit via running: make 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 c68150a0a1..891b6e61f4 100644 --- a/Sources/migrations/Types.swift +++ b/Sources/migrations/Types.swift @@ -3382,6 +3382,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias Page = Swift.Int + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -3390,10 +3394,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The unique identifier of the migration. /// /// - Remark: Generated from `#/components/parameters/migration-id`. From 800bad45ab1595fb2e0c8ee6b2f222ac73e8a10c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:04:04 +0000 Subject: [PATCH 11/28] Commit via running: make Sources/orgs --- Sources/orgs/Client.swift | 335 ++++++++++ Sources/orgs/Types.swift | 1300 +++++++++++++++++++++++++++++-------- 2 files changed, 1355 insertions(+), 280 deletions(-) diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index a956b70644..52ad7cee54 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -127,6 +127,248 @@ public struct Client: APIProtocol { } ) } + /// Get all custom property values for an organization + /// + /// Gets all custom property values that are set for an organization. + /// + /// The organization must belong to an enterprise. + /// + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `read:org` scope + /// - Actors with the organization-level "read custom properties for an organization" fine-grained permission or above + /// + /// - Remark: HTTP `GET /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)`. + public func orgsCustomPropertiesForOrgsGetOrganizationValues(_ input: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input) async throws -> Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Output { + try await client.send( + input: input, + forOperation: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/organizations/{}/org-properties/values", + 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.OrgsCustomPropertiesForOrgsGetOrganizationValues.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.CustomPropertyValue].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.BasicError.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.NotFound.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 .notFound(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Create or update custom property values for an organization + /// + /// Create new or update existing custom property values for an organization. + /// To remove a custom property value from an organization, set the property value to `null`. + /// + /// The organization must belong to an enterprise. + /// + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `admin:org` scope + /// - Actors with the organization-level "edit custom properties for an organization" fine-grained permission + /// + /// - Remark: HTTP `PATCH /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)`. + public func orgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues(_ input: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input) async throws -> Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Output { + try await client.send( + input: input, + forOperation: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/organizations/{}/org-properties/values", + parameters: [ + input.path.org + ] + ) + 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 204: + return .noContent(.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.BasicError.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.NotFound.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 .notFound(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.ValidationFailed.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ValidationError.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 an organization /// /// Gets information about an organization. @@ -848,6 +1090,99 @@ public struct Client: APIProtocol { } ) } + /// List attestation repositories + /// + /// List repositories owned by the provided organization that have created at least one attested artifact + /// Results will be sorted in ascending order by repository ID + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/repositories/get(orgs/list-attestation-repositories)`. + public func orgsListAttestationRepositories(_ input: Operations.OrgsListAttestationRepositories.Input) async throws -> Operations.OrgsListAttestationRepositories.Output { + try await client.send( + input: input, + forOperation: Operations.OrgsListAttestationRepositories.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/attestations/repositories", + 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: "per_page", + value: input.query.perPage + ) + 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: "predicate_type", + value: input.query.predicateType + ) + 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.OrgsListAttestationRepositories.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.OrgsListAttestationRepositories.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 + ) + ) + } + } + ) + } /// Delete attestations by ID /// /// Delete an artifact attestation by unique ID that is associated with a repository owned by an org. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 7d42a70307..7a80e82c57 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -21,6 +21,35 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `GET /organizations`. /// - Remark: Generated from `#/paths//organizations/get(orgs/list)`. func orgsList(_ input: Operations.OrgsList.Input) async throws -> Operations.OrgsList.Output + /// Get all custom property values for an organization + /// + /// Gets all custom property values that are set for an organization. + /// + /// The organization must belong to an enterprise. + /// + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `read:org` scope + /// - Actors with the organization-level "read custom properties for an organization" fine-grained permission or above + /// + /// - Remark: HTTP `GET /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)`. + func orgsCustomPropertiesForOrgsGetOrganizationValues(_ input: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input) async throws -> Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Output + /// Create or update custom property values for an organization + /// + /// Create new or update existing custom property values for an organization. + /// To remove a custom property value from an organization, set the property value to `null`. + /// + /// The organization must belong to an enterprise. + /// + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `admin:org` scope + /// - Actors with the organization-level "edit custom properties for an organization" fine-grained permission + /// + /// - Remark: HTTP `PATCH /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)`. + func orgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues(_ input: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input) async throws -> Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Output /// Get an organization /// /// Gets information about an organization. @@ -109,6 +138,14 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}/attestations/digest/{subject_digest}`. /// - Remark: Generated from `#/paths//orgs/{org}/attestations/digest/{subject_digest}/delete(orgs/delete-attestations-by-subject-digest)`. func orgsDeleteAttestationsBySubjectDigest(_ input: Operations.OrgsDeleteAttestationsBySubjectDigest.Input) async throws -> Operations.OrgsDeleteAttestationsBySubjectDigest.Output + /// List attestation repositories + /// + /// List repositories owned by the provided organization that have created at least one attested artifact + /// Results will be sorted in ascending order by repository ID + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/repositories/get(orgs/list-attestation-repositories)`. + func orgsListAttestationRepositories(_ input: Operations.OrgsListAttestationRepositories.Input) async throws -> Operations.OrgsListAttestationRepositories.Output /// Delete attestations by ID /// /// Delete an artifact attestation by unique ID that is associated with a repository owned by an org. @@ -1002,6 +1039,53 @@ extension APIProtocol { headers: headers )) } + /// Get all custom property values for an organization + /// + /// Gets all custom property values that are set for an organization. + /// + /// The organization must belong to an enterprise. + /// + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `read:org` scope + /// - Actors with the organization-level "read custom properties for an organization" fine-grained permission or above + /// + /// - Remark: HTTP `GET /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)`. + public func orgsCustomPropertiesForOrgsGetOrganizationValues( + path: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input.Path, + headers: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input.Headers = .init() + ) async throws -> Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Output { + try await orgsCustomPropertiesForOrgsGetOrganizationValues(Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input( + path: path, + headers: headers + )) + } + /// Create or update custom property values for an organization + /// + /// Create new or update existing custom property values for an organization. + /// To remove a custom property value from an organization, set the property value to `null`. + /// + /// The organization must belong to an enterprise. + /// + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `admin:org` scope + /// - Actors with the organization-level "edit custom properties for an organization" fine-grained permission + /// + /// - Remark: HTTP `PATCH /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)`. + public func orgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues( + path: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Path, + headers: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Headers = .init(), + body: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Body + ) async throws -> Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Output { + try await orgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues(Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input( + path: path, + headers: headers, + body: body + )) + } /// Get an organization /// /// Gets information about an organization. @@ -1164,6 +1248,24 @@ extension APIProtocol { headers: headers )) } + /// List attestation repositories + /// + /// List repositories owned by the provided organization that have created at least one attested artifact + /// Results will be sorted in ascending order by repository ID + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/repositories/get(orgs/list-attestation-repositories)`. + public func orgsListAttestationRepositories( + path: Operations.OrgsListAttestationRepositories.Input.Path, + query: Operations.OrgsListAttestationRepositories.Input.Query = .init(), + headers: Operations.OrgsListAttestationRepositories.Input.Headers = .init() + ) async throws -> Operations.OrgsListAttestationRepositories.Output { + try await orgsListAttestationRepositories(Operations.OrgsListAttestationRepositories.Input( + path: path, + query: query, + headers: headers + )) + } /// Delete attestations by ID /// /// Delete an artifact attestation by unique ID that is associated with a repository owned by an org. @@ -3961,6 +4063,17 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/workflows`. public var workflows: Components.Schemas.AppPermissions.WorkflowsPayload? + /// The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/custom_properties_for_organizations`. + @frozen public enum CustomPropertiesForOrganizationsPayload: String, Codable, Hashable, Sendable, CaseIterable { + case read = "read" + case write = "write" + } + /// The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/custom_properties_for_organizations`. + public var customPropertiesForOrganizations: Components.Schemas.AppPermissions.CustomPropertiesForOrganizationsPayload? /// The level of permission to grant the access token for organization teams and members. /// /// - Remark: Generated from `#/components/schemas/app-permissions/members`. @@ -4234,6 +4347,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/app-permissions/starring`. public var starring: Components.Schemas.AppPermissions.StarringPayload? + /// The level of permission to grant the access token for organization custom properties management at the enterprise level. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/enterprise_custom_properties_for_organizations`. + @frozen public enum EnterpriseCustomPropertiesForOrganizationsPayload: String, Codable, Hashable, Sendable, CaseIterable { + case read = "read" + case write = "write" + case admin = "admin" + } + /// The level of permission to grant the access token for organization custom properties management at the enterprise level. + /// + /// - Remark: Generated from `#/components/schemas/app-permissions/enterprise_custom_properties_for_organizations`. + public var enterpriseCustomPropertiesForOrganizations: Components.Schemas.AppPermissions.EnterpriseCustomPropertiesForOrganizationsPayload? /// Creates a new `AppPermissions`. /// /// - Parameters: @@ -4260,6 +4385,7 @@ public enum Components { /// - statuses: The level of permission to grant the access token for commit statuses. /// - vulnerabilityAlerts: The level of permission to grant the access token to manage Dependabot alerts. /// - workflows: The level of permission to grant the access token to update GitHub Actions workflow files. + /// - customPropertiesForOrganizations: The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. /// - members: The level of permission to grant the access token for organization teams and members. /// - organizationAdministration: The level of permission to grant the access token to manage access to an organization. /// - organizationCustomRoles: The level of permission to grant the access token for custom repository roles management. @@ -4285,6 +4411,7 @@ public enum Components { /// - interactionLimits: The level of permission to grant the access token to view and manage interaction limits on a repository. /// - profile: The level of permission to grant the access token to manage the profile settings belonging to a user. /// - starring: The level of permission to grant the access token to list and manage repositories a user is starring. + /// - enterpriseCustomPropertiesForOrganizations: The level of permission to grant the access token for organization custom properties management at the enterprise level. public init( actions: Components.Schemas.AppPermissions.ActionsPayload? = nil, administration: Components.Schemas.AppPermissions.AdministrationPayload? = nil, @@ -4309,6 +4436,7 @@ public enum Components { statuses: Components.Schemas.AppPermissions.StatusesPayload? = nil, vulnerabilityAlerts: Components.Schemas.AppPermissions.VulnerabilityAlertsPayload? = nil, workflows: Components.Schemas.AppPermissions.WorkflowsPayload? = nil, + customPropertiesForOrganizations: Components.Schemas.AppPermissions.CustomPropertiesForOrganizationsPayload? = nil, members: Components.Schemas.AppPermissions.MembersPayload? = nil, organizationAdministration: Components.Schemas.AppPermissions.OrganizationAdministrationPayload? = nil, organizationCustomRoles: Components.Schemas.AppPermissions.OrganizationCustomRolesPayload? = nil, @@ -4333,7 +4461,8 @@ public enum Components { gpgKeys: Components.Schemas.AppPermissions.GpgKeysPayload? = nil, interactionLimits: Components.Schemas.AppPermissions.InteractionLimitsPayload? = nil, profile: Components.Schemas.AppPermissions.ProfilePayload? = nil, - starring: Components.Schemas.AppPermissions.StarringPayload? = nil + starring: Components.Schemas.AppPermissions.StarringPayload? = nil, + enterpriseCustomPropertiesForOrganizations: Components.Schemas.AppPermissions.EnterpriseCustomPropertiesForOrganizationsPayload? = nil ) { self.actions = actions self.administration = administration @@ -4358,6 +4487,7 @@ public enum Components { self.statuses = statuses self.vulnerabilityAlerts = vulnerabilityAlerts self.workflows = workflows + self.customPropertiesForOrganizations = customPropertiesForOrganizations self.members = members self.organizationAdministration = organizationAdministration self.organizationCustomRoles = organizationCustomRoles @@ -4383,6 +4513,7 @@ public enum Components { self.interactionLimits = interactionLimits self.profile = profile self.starring = starring + self.enterpriseCustomPropertiesForOrganizations = enterpriseCustomPropertiesForOrganizations } public enum CodingKeys: String, CodingKey { case actions @@ -4408,6 +4539,7 @@ public enum Components { case statuses case vulnerabilityAlerts = "vulnerability_alerts" case workflows + case customPropertiesForOrganizations = "custom_properties_for_organizations" case members case organizationAdministration = "organization_administration" case organizationCustomRoles = "organization_custom_roles" @@ -4433,6 +4565,7 @@ public enum Components { case interactionLimits = "interaction_limits" case profile case starring + case enterpriseCustomPropertiesForOrganizations = "enterprise_custom_properties_for_organizations" } } /// A GitHub user. @@ -4820,6 +4953,91 @@ public enum Components { case htmlUrl = "html_url" } } + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct OrganizationSimple: 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 nodeId: 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 reposUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var eventsUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooksUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issuesUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var membersUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var publicMembersUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatarUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `OrganizationSimple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - nodeId: + /// - url: + /// - reposUrl: + /// - eventsUrl: + /// - hooksUrl: + /// - issuesUrl: + /// - membersUrl: + /// - publicMembersUrl: + /// - avatarUrl: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + reposUrl: Swift.String, + eventsUrl: Swift.String, + hooksUrl: Swift.String, + issuesUrl: Swift.String, + membersUrl: Swift.String, + publicMembersUrl: Swift.String, + avatarUrl: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.nodeId = nodeId + self.url = url + self.reposUrl = reposUrl + self.eventsUrl = eventsUrl + self.hooksUrl = hooksUrl + self.issuesUrl = issuesUrl + self.membersUrl = membersUrl + self.publicMembersUrl = publicMembersUrl + self.avatarUrl = avatarUrl + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case nodeId = "node_id" + case url + case reposUrl = "repos_url" + case eventsUrl = "events_url" + case hooksUrl = "hooks_url" + case issuesUrl = "issues_url" + case membersUrl = "members_url" + case publicMembersUrl = "public_members_url" + case avatarUrl = "avatar_url" + case description + } + } /// The type of issue. /// /// - Remark: Generated from `#/components/schemas/issue-type`. @@ -5768,118 +5986,99 @@ public enum Components { case customProperties = "custom_properties" } } - /// A GitHub organization. + /// Custom property name and associated value /// - /// - Remark: Generated from `#/components/schemas/organization-simple`. - public struct OrganizationSimple: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/organization-simple/login`. + /// - Remark: Generated from `#/components/schemas/custom-property-value`. + public struct CustomPropertyValue: Codable, Hashable, Sendable { + /// The name of the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value/property_name`. + public var propertyName: Swift.String + /// The value assigned to the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. + @frozen public enum ValuePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case2`. + case case2([Swift.String]) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + 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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } + /// The value assigned to the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. + public var value: Components.Schemas.CustomPropertyValue.ValuePayload? + /// Creates a new `CustomPropertyValue`. + /// + /// - Parameters: + /// - propertyName: The name of the property + /// - value: The value assigned to the property + public init( + propertyName: Swift.String, + value: Components.Schemas.CustomPropertyValue.ValuePayload? = nil + ) { + self.propertyName = propertyName + self.value = value + } + public enum CodingKeys: String, CodingKey { + case propertyName = "property_name" + case value + } + } + /// Organization Full + /// + /// - Remark: Generated from `#/components/schemas/organization-full`. + public struct OrganizationFull: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/organization-full/login`. public var login: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/id`. + /// - Remark: Generated from `#/components/schemas/organization-full/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/organization-simple/node_id`. + /// - Remark: Generated from `#/components/schemas/organization-full/node_id`. public var nodeId: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/url`. + /// - Remark: Generated from `#/components/schemas/organization-full/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/repos_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/repos_url`. public var reposUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/events_url`. public var eventsUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/hooks_url`. public var hooksUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/issues_url`. public var issuesUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/members_url`. public var membersUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/public_members_url`. public var publicMembersUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + /// - Remark: Generated from `#/components/schemas/organization-full/avatar_url`. public var avatarUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-simple/description`. - public var description: Swift.String? - /// Creates a new `OrganizationSimple`. - /// - /// - Parameters: - /// - login: - /// - id: - /// - nodeId: - /// - url: - /// - reposUrl: - /// - eventsUrl: - /// - hooksUrl: - /// - issuesUrl: - /// - membersUrl: - /// - publicMembersUrl: - /// - avatarUrl: - /// - description: - public init( - login: Swift.String, - id: Swift.Int, - nodeId: Swift.String, - url: Swift.String, - reposUrl: Swift.String, - eventsUrl: Swift.String, - hooksUrl: Swift.String, - issuesUrl: Swift.String, - membersUrl: Swift.String, - publicMembersUrl: Swift.String, - avatarUrl: Swift.String, - description: Swift.String? = nil - ) { - self.login = login - self.id = id - self.nodeId = nodeId - self.url = url - self.reposUrl = reposUrl - self.eventsUrl = eventsUrl - self.hooksUrl = hooksUrl - self.issuesUrl = issuesUrl - self.membersUrl = membersUrl - self.publicMembersUrl = publicMembersUrl - self.avatarUrl = avatarUrl - self.description = description - } - public enum CodingKeys: String, CodingKey { - case login - case id - case nodeId = "node_id" - case url - case reposUrl = "repos_url" - case eventsUrl = "events_url" - case hooksUrl = "hooks_url" - case issuesUrl = "issues_url" - case membersUrl = "members_url" - case publicMembersUrl = "public_members_url" - case avatarUrl = "avatar_url" - case description - } - } - /// Organization Full - /// - /// - Remark: Generated from `#/components/schemas/organization-full`. - public struct OrganizationFull: 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 nodeId: 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 reposUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/events_url`. - public var eventsUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/hooks_url`. - public var hooksUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/issues_url`. - public var issuesUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/members_url`. - public var membersUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/public_members_url`. - public var publicMembersUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/avatar_url`. - public var avatarUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/organization-full/description`. + /// - 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? @@ -8580,72 +8779,6 @@ public enum Components { case valuesEditableBy = "values_editable_by" } } - /// Custom property name and associated value - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value`. - public struct CustomPropertyValue: Codable, Hashable, Sendable { - /// The name of the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/property_name`. - public var propertyName: Swift.String - /// The value assigned to the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. - @frozen public enum ValuePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case1`. - case case1(Swift.String) - /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - 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 .case1(value): - try encoder.encodeToSingleValueContainer(value) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } - } - } - /// The value assigned to the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. - public var value: Components.Schemas.CustomPropertyValue.ValuePayload? - /// Creates a new `CustomPropertyValue`. - /// - /// - Parameters: - /// - propertyName: The name of the property - /// - value: The value assigned to the property - public init( - propertyName: Swift.String, - value: Components.Schemas.CustomPropertyValue.ValuePayload? = nil - ) { - self.propertyName = propertyName - self.value = value - } - public enum CodingKeys: String, CodingKey { - case propertyName = "property_name" - case value - } - } /// List of custom property values for a repository /// /// - Remark: Generated from `#/components/schemas/org-repo-custom-property-values`. @@ -8862,6 +8995,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The slug of the team name. /// /// - Remark: Generated from `#/components/parameters/team-slug`. @@ -8870,10 +9007,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/since-org`. public typealias SinceOrg = Swift.Int - /// 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 repository. /// /// - Remark: Generated from `#/components/parameters/repository-id`. @@ -9514,28 +9647,27 @@ public enum Operations { } } } - /// Get an organization - /// - /// Gets information about an organization. - /// - /// When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + /// Get all custom property values for an organization /// - /// To see the full details about an organization, the authenticated user must be an organization owner. + /// Gets all custom property values that are set for an organization. /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. + /// The organization must belong to an enterprise. /// - /// To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `read:org` scope + /// - Actors with the organization-level "read custom properties for an organization" fine-grained permission or above /// - /// - Remark: HTTP `GET /orgs/{org}`. - /// - Remark: Generated from `#/paths//orgs/{org}/get(orgs/get)`. - public enum OrgsGet { - public static let id: Swift.String = "orgs/get" + /// - Remark: HTTP `GET /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)`. + public enum OrgsCustomPropertiesForOrgsGetOrganizationValues { + public static let id: Swift.String = "orgs/custom-properties-for-orgs-get-organization-values" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/GET/path`. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/GET/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/GET/path/org`. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/GET/path/org`. public var org: Components.Parameters.Org /// Creates a new `Path`. /// @@ -9545,27 +9677,27 @@ public enum Operations { self.org = org } } - public var path: Operations.OrgsGet.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/GET/header`. + public var path: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input.Path + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/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.OrgsGet.Input.Headers + public var headers: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.OrgsGet.Input.Path, - headers: Operations.OrgsGet.Input.Headers = .init() + path: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input.Path, + headers: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -9573,15 +9705,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.OrganizationFull) + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/GET/responses/200/content/application\/json`. + case json([Components.Schemas.CustomPropertyValue]) /// 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.OrganizationFull { + public var json: [Components.Schemas.CustomPropertyValue] { get throws { switch self { case let .json(body): @@ -9591,26 +9723,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.OrgsGet.Output.Ok.Body + public var body: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.OrgsGet.Output.Ok.Body) { + public init(body: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//orgs/{org}/get(orgs/get)/responses/200`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.OrgsGet.Output.Ok) + case ok(Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.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.OrgsGet.Output.Ok { + public var ok: Operations.OrgsCustomPropertiesForOrgsGetOrganizationValues.Output.Ok { get throws { switch self { case let .ok(response): @@ -9623,9 +9755,32 @@ public enum Operations { } } } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)/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}/get(orgs/get)/responses/404`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/get(orgs/custom-properties-for-orgs-get-organization-values)/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Components.Responses.NotFound) @@ -9677,30 +9832,28 @@ public enum Operations { } } } - /// Update an organization - /// - /// > [!WARNING] - /// > **Closing down 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). + /// Create or update custom property values for an organization /// - /// > [!WARNING] - /// > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. 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. + /// Create new or update existing custom property values for an organization. + /// To remove a custom property value from an organization, set the property value to `null`. /// - /// The authenticated user must be an organization owner to use this endpoint. + /// The organization must belong to an enterprise. /// - /// OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. + /// Access requirements: + /// - Organization admins + /// - OAuth tokens and personal access tokens (classic) with the `admin:org` scope + /// - Actors with the organization-level "edit custom properties for an organization" fine-grained permission /// - /// - Remark: HTTP `PATCH /orgs/{org}`. - /// - Remark: Generated from `#/paths//orgs/{org}/patch(orgs/update)`. - public enum OrgsUpdate { - public static let id: Swift.String = "orgs/update" + /// - Remark: HTTP `PATCH /organizations/{org}/org-properties/values`. + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)`. + public enum OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues { + public static let id: Swift.String = "orgs/custom-properties-for-orgs-create-or-update-organization-values" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/path`. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/path`. public struct Path: Sendable, Hashable { /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/path/org`. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/path/org`. public var org: Components.Parameters.Org /// Creates a new `Path`. /// @@ -9710,79 +9863,463 @@ public enum Operations { self.org = org } } - public var path: Operations.OrgsUpdate.Input.Path - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/header`. + public var path: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Path + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/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.OrgsUpdate.Input.Headers - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody`. + public var headers: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Headers + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json`. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// Billing email address. This address is not publicized. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/billing_email`. - public var billingEmail: Swift.String? - /// The company name. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/company`. - public var company: Swift.String? - /// The publicly visible email address. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/email`. - public var email: Swift.String? - /// The Twitter username of the company. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/twitter_username`. - public var twitterUsername: Swift.String? - /// The location. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/location`. - public var location: Swift.String? - /// The shorthand name of the company. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/name`. - public var name: Swift.String? - /// The description of the company. The maximum size is 160 characters. + /// A list of custom property names and associated values to apply to the organization. /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/description`. - public var description: Swift.String? - /// Whether an organization can use organization projects. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/has_organization_projects`. - public var hasOrganizationProjects: Swift.Bool? - /// Whether repositories that belong to the organization can use repository projects. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/has_repository_projects`. - public var hasRepositoryProjects: Swift.Bool? - /// Default permission level members have for organization repositories. + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/requestBody/json/properties`. + public var properties: [Components.Schemas.CustomPropertyValue] + /// Creates a new `JsonPayload`. /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/default_repository_permission`. - @frozen public enum DefaultRepositoryPermissionPayload: String, Codable, Hashable, Sendable, CaseIterable { - case read = "read" - case write = "write" - case admin = "admin" - case none = "none" + /// - Parameters: + /// - properties: A list of custom property names and associated values to apply to the organization. + public init(properties: [Components.Schemas.CustomPropertyValue]) { + self.properties = properties } - /// Default permission level members have for organization repositories. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/default_repository_permission`. - public var defaultRepositoryPermission: Operations.OrgsUpdate.Input.Body.JsonPayload.DefaultRepositoryPermissionPayload? - /// Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_can_create_repositories`. - public var membersCanCreateRepositories: Swift.Bool? - /// Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_can_create_internal_repositories`. + public enum CodingKeys: String, CodingKey { + case properties + } + } + /// - Remark: Generated from `#/paths/organizations/{org}/org-properties/values/PATCH/requestBody/content/application\/json`. + case json(Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Body.JsonPayload) + } + public var body: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Path, + headers: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Headers = .init(), + body: Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// No Content when custom property values are successfully created or updated + /// + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Output.NoContent) + /// No Content when custom property values are successfully created or updated + /// + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// 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.OrgsCustomPropertiesForOrgsCreateOrUpdateOrganizationValues.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) + } + } + } + /// Forbidden + /// + /// - Remark: Generated from `#/paths//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)/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//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.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: Components.Responses.NotFound { + 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//organizations/{org}/org-properties/values/patch(orgs/custom-properties-for-orgs-create-or-update-organization-values)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Components.Responses.ValidationFailed) + /// 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.ValidationFailed { + 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 + ] + } + } + } + /// Get an organization + /// + /// Gets information about an organization. + /// + /// When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + /// + /// To see the full details about an organization, the authenticated user must be an organization owner. + /// + /// 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. + /// + /// - Remark: HTTP `GET /orgs/{org}`. + /// - Remark: Generated from `#/paths//orgs/{org}/get(orgs/get)`. + public enum OrgsGet { + public static let id: Swift.String = "orgs/get" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/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.OrgsGet.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/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.OrgsGet.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.OrgsGet.Input.Path, + headers: Operations.OrgsGet.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}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.OrganizationFull) + /// 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.OrganizationFull { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.OrgsGet.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.OrgsGet.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/get(orgs/get)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.OrgsGet.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.OrgsGet.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}/get(orgs/get)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Components.Responses.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: Components.Responses.NotFound { + 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 an organization + /// + /// > [!WARNING] + /// > **Closing down 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] + /// > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. 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. + /// + /// The authenticated user must be an organization owner to use this endpoint. + /// + /// OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. + /// + /// - Remark: HTTP `PATCH /orgs/{org}`. + /// - Remark: Generated from `#/paths//orgs/{org}/patch(orgs/update)`. + public enum OrgsUpdate { + public static let id: Swift.String = "orgs/update" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/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.OrgsUpdate.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/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.OrgsUpdate.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// Billing email address. This address is not publicized. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/billing_email`. + public var billingEmail: Swift.String? + /// The company name. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/company`. + public var company: Swift.String? + /// The publicly visible email address. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/email`. + public var email: Swift.String? + /// The Twitter username of the company. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/twitter_username`. + public var twitterUsername: Swift.String? + /// The location. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/location`. + public var location: Swift.String? + /// The shorthand name of the company. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/name`. + public var name: Swift.String? + /// The description of the company. The maximum size is 160 characters. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/description`. + public var description: Swift.String? + /// Whether an organization can use organization projects. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/has_organization_projects`. + public var hasOrganizationProjects: Swift.Bool? + /// Whether repositories that belong to the organization can use repository projects. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/has_repository_projects`. + public var hasRepositoryProjects: Swift.Bool? + /// Default permission level members have for organization repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/default_repository_permission`. + @frozen public enum DefaultRepositoryPermissionPayload: String, Codable, Hashable, Sendable, CaseIterable { + case read = "read" + case write = "write" + case admin = "admin" + case none = "none" + } + /// Default permission level members have for organization repositories. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/default_repository_permission`. + public var defaultRepositoryPermission: Operations.OrgsUpdate.Input.Body.JsonPayload.DefaultRepositoryPermissionPayload? + /// Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_can_create_repositories`. + public var membersCanCreateRepositories: Swift.Bool? + /// Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/PATCH/requestBody/json/members_can_create_internal_repositories`. public var membersCanCreateInternalRepositories: Swift.Bool? /// Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. /// @@ -11026,7 +11563,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/attestations/bulk-list/POST/requestBody/json/subject_digests`. public var subjectDigests: [Swift.String] /// Optional filter for fetching attestations with a given predicate type. - /// This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + /// This option accepts `provenance`, `sbom`, `release`, or freeform text + /// for custom predicate types. /// /// - Remark: Generated from `#/paths/orgs/{org}/attestations/bulk-list/POST/requestBody/json/predicate_type`. public var predicateType: Swift.String? @@ -11747,6 +12285,207 @@ public enum Operations { } } } + /// List attestation repositories + /// + /// List repositories owned by the provided organization that have created at least one attested artifact + /// Results will be sorted in ascending order by repository ID + /// + /// - Remark: HTTP `GET /orgs/{org}/attestations/repositories`. + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/repositories/get(orgs/list-attestation-repositories)`. + public enum OrgsListAttestationRepositories { + public static let id: Swift.String = "orgs/list-attestation-repositories" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/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.OrgsListAttestationRepositories.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/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}/attestations/repositories/GET/query/per_page`. + public var perPage: Components.Parameters.PerPage? + /// 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/repositories/GET/query/before`. + public var before: Components.Parameters.PaginationBefore? + /// 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/repositories/GET/query/after`. + public var after: Components.Parameters.PaginationAfter? + /// Optional filter for fetching attestations with a given predicate type. + /// This option accepts `provenance`, `sbom`, `release`, or freeform text + /// for custom predicate types. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/query/predicate_type`. + public var predicateType: Swift.String? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - perPage: 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)." + /// - predicateType: Optional filter for fetching attestations with a given predicate type. + public init( + perPage: Components.Parameters.PerPage? = nil, + before: Components.Parameters.PaginationBefore? = nil, + after: Components.Parameters.PaginationAfter? = nil, + predicateType: Swift.String? = nil + ) { + self.perPage = perPage + self.before = before + self.after = after + self.predicateType = predicateType + } + } + public var query: Operations.OrgsListAttestationRepositories.Input.Query + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/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.OrgsListAttestationRepositories.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.OrgsListAttestationRepositories.Input.Path, + query: Operations.OrgsListAttestationRepositories.Input.Query = .init(), + headers: Operations.OrgsListAttestationRepositories.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/repositories/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/responses/200/content/JsonPayload`. + public struct JsonPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/responses/200/content/JsonPayload/id`. + public var id: Swift.Int? + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/responses/200/content/JsonPayload/name`. + public var name: Swift.String? + /// Creates a new `JsonPayloadPayload`. + /// + /// - Parameters: + /// - id: + /// - name: + public init( + id: Swift.Int? = nil, + name: Swift.String? = nil + ) { + self.id = id + self.name = name + } + public enum CodingKeys: String, CodingKey { + case id + case name + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/responses/200/content/json`. + public typealias JsonPayload = [Operations.OrgsListAttestationRepositories.Output.Ok.Body.JsonPayloadPayload] + /// - Remark: Generated from `#/paths/orgs/{org}/attestations/repositories/GET/responses/200/content/application\/json`. + case json(Operations.OrgsListAttestationRepositories.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.OrgsListAttestationRepositories.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.OrgsListAttestationRepositories.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.OrgsListAttestationRepositories.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/attestations/repositories/get(orgs/list-attestation-repositories)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.OrgsListAttestationRepositories.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.OrgsListAttestationRepositories.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 + ] + } + } + } /// Delete attestations by ID /// /// Delete an artifact attestation by unique ID that is associated with a repository owned by an org. @@ -12005,7 +12744,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/query/after`. public var after: Components.Parameters.PaginationAfter? /// Optional filter for fetching attestations with a given predicate type. - /// This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + /// This option accepts `provenance`, `sbom`, `release`, or freeform text + /// for custom predicate types. /// /// - Remark: Generated from `#/paths/orgs/{org}/attestations/{subject_digest}/GET/query/predicate_type`. public var predicateType: Swift.String? From 605e3ea5383910448b252a163a33512dffbdbac4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:04:50 +0000 Subject: [PATCH 12/28] Commit via running: make Sources/projects-classic --- Sources/projects-classic/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/projects-classic/Types.swift b/Sources/projects-classic/Types.swift index f93db3881e..0777019b33 100644 --- a/Sources/projects-classic/Types.swift +++ b/Sources/projects-classic/Types.swift @@ -1306,6 +1306,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -1314,10 +1318,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The unique identifier of the project. /// /// - Remark: Generated from `#/components/parameters/project-id`. From 9815c9e311975164a5c3e859652bf95a39b064ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:05:58 +0000 Subject: [PATCH 13/28] Commit via running: make 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 c75c28d18d..a63807c418 100644 --- a/Sources/reactions/Types.swift +++ b/Sources/reactions/Types.swift @@ -1114,6 +1114,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias Page = Swift.Int + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The slug of the team name. /// /// - Remark: Generated from `#/components/parameters/team-slug`. @@ -1130,10 +1134,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The number that identifies the discussion. /// /// - Remark: Generated from `#/components/parameters/discussion-number`. From 5289371bcbfa151466288f7ac5a3c4ce55864034 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:06:22 +0000 Subject: [PATCH 14/28] Commit via running: make Sources/repos --- Sources/repos/Types.swift | 731 +++++++++++++++++++------------------- 1 file changed, 366 insertions(+), 365 deletions(-) diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 7c1479eefa..dc08f8a401 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -8636,289 +8636,6 @@ public enum Components { case rocket } } - /// Data related to a release. - /// - /// - Remark: Generated from `#/components/schemas/release-asset`. - public struct ReleaseAsset: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/release-asset/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/release-asset/browser_download_url`. - public var browserDownloadUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/release-asset/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/release-asset/node_id`. - public var nodeId: Swift.String - /// The file name of the asset. - /// - /// - Remark: Generated from `#/components/schemas/release-asset/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/release-asset/label`. - public var label: Swift.String? - /// State of the release asset. - /// - /// - Remark: Generated from `#/components/schemas/release-asset/state`. - @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { - case uploaded = "uploaded" - case open = "open" - } - /// State of the release asset. - /// - /// - Remark: Generated from `#/components/schemas/release-asset/state`. - public var state: Components.Schemas.ReleaseAsset.StatePayload - /// - Remark: Generated from `#/components/schemas/release-asset/content_type`. - public var contentType: Swift.String - /// - Remark: Generated from `#/components/schemas/release-asset/size`. - public var size: Swift.Int - /// - Remark: Generated from `#/components/schemas/release-asset/digest`. - public var digest: Swift.String? - /// - Remark: Generated from `#/components/schemas/release-asset/download_count`. - public var downloadCount: Swift.Int - /// - Remark: Generated from `#/components/schemas/release-asset/created_at`. - public var createdAt: Foundation.Date - /// - Remark: Generated from `#/components/schemas/release-asset/updated_at`. - public var updatedAt: Foundation.Date - /// - Remark: Generated from `#/components/schemas/release-asset/uploader`. - public var uploader: Components.Schemas.NullableSimpleUser? - /// Creates a new `ReleaseAsset`. - /// - /// - Parameters: - /// - url: - /// - browserDownloadUrl: - /// - id: - /// - nodeId: - /// - name: The file name of the asset. - /// - label: - /// - state: State of the release asset. - /// - contentType: - /// - size: - /// - digest: - /// - downloadCount: - /// - createdAt: - /// - updatedAt: - /// - uploader: - public init( - url: Swift.String, - browserDownloadUrl: Swift.String, - id: Swift.Int, - nodeId: Swift.String, - name: Swift.String, - label: Swift.String? = nil, - state: Components.Schemas.ReleaseAsset.StatePayload, - contentType: Swift.String, - size: Swift.Int, - digest: Swift.String? = nil, - downloadCount: Swift.Int, - createdAt: Foundation.Date, - updatedAt: Foundation.Date, - uploader: Components.Schemas.NullableSimpleUser? = nil - ) { - self.url = url - self.browserDownloadUrl = browserDownloadUrl - self.id = id - self.nodeId = nodeId - self.name = name - self.label = label - self.state = state - self.contentType = contentType - self.size = size - self.digest = digest - self.downloadCount = downloadCount - self.createdAt = createdAt - self.updatedAt = updatedAt - self.uploader = uploader - } - public enum CodingKeys: String, CodingKey { - case url - case browserDownloadUrl = "browser_download_url" - case id - case nodeId = "node_id" - case name - case label - case state - case contentType = "content_type" - case size - case digest - case downloadCount = "download_count" - case createdAt = "created_at" - case updatedAt = "updated_at" - case uploader - } - } - /// A release. - /// - /// - Remark: Generated from `#/components/schemas/release`. - public struct Release: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/release/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/release/html_url`. - public var htmlUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/release/assets_url`. - public var assetsUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/release/upload_url`. - public var uploadUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/release/tarball_url`. - public var tarballUrl: Swift.String? - /// - Remark: Generated from `#/components/schemas/release/zipball_url`. - public var zipballUrl: Swift.String? - /// - Remark: Generated from `#/components/schemas/release/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/release/node_id`. - public var nodeId: Swift.String - /// The name of the tag. - /// - /// - Remark: Generated from `#/components/schemas/release/tag_name`. - public var tagName: Swift.String - /// Specifies the commitish value that determines where the Git tag is created from. - /// - /// - Remark: Generated from `#/components/schemas/release/target_commitish`. - public var targetCommitish: Swift.String - /// - Remark: Generated from `#/components/schemas/release/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/release/body`. - public var body: Swift.String? - /// true to create a draft (unpublished) release, false to create a published one. - /// - /// - Remark: Generated from `#/components/schemas/release/draft`. - public var draft: Swift.Bool - /// Whether to identify the release as a prerelease or a full release. - /// - /// - Remark: Generated from `#/components/schemas/release/prerelease`. - public var prerelease: Swift.Bool - /// Whether or not the release is immutable. - /// - /// - Remark: Generated from `#/components/schemas/release/immutable`. - public var immutable: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/release/created_at`. - public var createdAt: Foundation.Date - /// - Remark: Generated from `#/components/schemas/release/published_at`. - public var publishedAt: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/release/updated_at`. - public var updatedAt: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/release/author`. - public var author: Components.Schemas.SimpleUser - /// - Remark: Generated from `#/components/schemas/release/assets`. - public var assets: [Components.Schemas.ReleaseAsset] - /// - Remark: Generated from `#/components/schemas/release/body_html`. - public var bodyHtml: Swift.String? - /// - Remark: Generated from `#/components/schemas/release/body_text`. - public var bodyText: Swift.String? - /// - Remark: Generated from `#/components/schemas/release/mentions_count`. - public var mentionsCount: Swift.Int? - /// The URL of the release discussion. - /// - /// - Remark: Generated from `#/components/schemas/release/discussion_url`. - public var discussionUrl: Swift.String? - /// - Remark: Generated from `#/components/schemas/release/reactions`. - public var reactions: Components.Schemas.ReactionRollup? - /// Creates a new `Release`. - /// - /// - Parameters: - /// - url: - /// - htmlUrl: - /// - assetsUrl: - /// - uploadUrl: - /// - tarballUrl: - /// - zipballUrl: - /// - id: - /// - nodeId: - /// - tagName: The name of the tag. - /// - targetCommitish: Specifies the commitish value that determines where the Git tag is created from. - /// - name: - /// - body: - /// - draft: true to create a draft (unpublished) release, false to create a published one. - /// - prerelease: Whether to identify the release as a prerelease or a full release. - /// - immutable: Whether or not the release is immutable. - /// - createdAt: - /// - publishedAt: - /// - updatedAt: - /// - author: - /// - assets: - /// - bodyHtml: - /// - bodyText: - /// - mentionsCount: - /// - discussionUrl: The URL of the release discussion. - /// - reactions: - public init( - url: Swift.String, - htmlUrl: Swift.String, - assetsUrl: Swift.String, - uploadUrl: Swift.String, - tarballUrl: Swift.String? = nil, - zipballUrl: Swift.String? = nil, - id: Swift.Int, - nodeId: Swift.String, - tagName: Swift.String, - targetCommitish: Swift.String, - name: Swift.String? = nil, - body: Swift.String? = nil, - draft: Swift.Bool, - prerelease: Swift.Bool, - immutable: Swift.Bool? = nil, - createdAt: Foundation.Date, - publishedAt: Foundation.Date? = nil, - updatedAt: Foundation.Date? = nil, - author: Components.Schemas.SimpleUser, - assets: [Components.Schemas.ReleaseAsset], - bodyHtml: Swift.String? = nil, - bodyText: Swift.String? = nil, - mentionsCount: Swift.Int? = nil, - discussionUrl: Swift.String? = nil, - reactions: Components.Schemas.ReactionRollup? = nil - ) { - self.url = url - self.htmlUrl = htmlUrl - self.assetsUrl = assetsUrl - self.uploadUrl = uploadUrl - self.tarballUrl = tarballUrl - self.zipballUrl = zipballUrl - self.id = id - self.nodeId = nodeId - self.tagName = tagName - self.targetCommitish = targetCommitish - self.name = name - self.body = body - self.draft = draft - self.prerelease = prerelease - self.immutable = immutable - self.createdAt = createdAt - self.publishedAt = publishedAt - self.updatedAt = updatedAt - self.author = author - self.assets = assets - self.bodyHtml = bodyHtml - self.bodyText = bodyText - self.mentionsCount = mentionsCount - self.discussionUrl = discussionUrl - self.reactions = reactions - } - public enum CodingKeys: String, CodingKey { - case url - case htmlUrl = "html_url" - case assetsUrl = "assets_url" - case uploadUrl = "upload_url" - case tarballUrl = "tarball_url" - case zipballUrl = "zipball_url" - case id - case nodeId = "node_id" - case tagName = "tag_name" - case targetCommitish = "target_commitish" - case name - case body - case draft - case prerelease - case immutable - case createdAt = "created_at" - case publishedAt = "published_at" - case updatedAt = "updated_at" - case author - case assets - case bodyHtml = "body_html" - case bodyText = "body_text" - case mentionsCount = "mentions_count" - case discussionUrl = "discussion_url" - case reactions - } - } /// - Remark: Generated from `#/components/schemas/security-and-analysis`. public struct SecurityAndAnalysis: Codable, Hashable, Sendable { /// Enable or disable GitHub Advanced Security for the repository. @@ -9777,6 +9494,72 @@ public enum Components { case customProperties = "custom_properties" } } + /// Custom property name and associated value + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value`. + public struct CustomPropertyValue: Codable, Hashable, Sendable { + /// The name of the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value/property_name`. + public var propertyName: Swift.String + /// The value assigned to the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. + @frozen public enum ValuePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case2`. + case case2([Swift.String]) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + 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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } + /// The value assigned to the property + /// + /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. + public var value: Components.Schemas.CustomPropertyValue.ValuePayload? + /// Creates a new `CustomPropertyValue`. + /// + /// - Parameters: + /// - propertyName: The name of the property + /// - value: The value assigned to the property + public init( + propertyName: Swift.String, + value: Components.Schemas.CustomPropertyValue.ValuePayload? = nil + ) { + self.propertyName = propertyName + self.value = value + } + public enum CodingKeys: String, CodingKey { + case propertyName = "property_name" + case value + } + } /// An object without any properties. /// /// - Remark: Generated from `#/components/schemas/empty-object`. @@ -10589,72 +10372,6 @@ public enum Components { case draft } } - /// Custom property name and associated value - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value`. - public struct CustomPropertyValue: Codable, Hashable, Sendable { - /// The name of the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/property_name`. - public var propertyName: Swift.String - /// The value assigned to the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. - @frozen public enum ValuePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case1`. - case case1(Swift.String) - /// - Remark: Generated from `#/components/schemas/custom-property-value/value/case2`. - case case2([Swift.String]) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) - } - do { - self = .case2(try decoder.decodeFromSingleValueContainer()) - 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 .case1(value): - try encoder.encodeToSingleValueContainer(value) - case let .case2(value): - try encoder.encodeToSingleValueContainer(value) - } - } - } - /// The value assigned to the property - /// - /// - Remark: Generated from `#/components/schemas/custom-property-value/value`. - public var value: Components.Schemas.CustomPropertyValue.ValuePayload? - /// Creates a new `CustomPropertyValue`. - /// - /// - Parameters: - /// - propertyName: The name of the property - /// - value: The value assigned to the property - public init( - propertyName: Swift.String, - value: Components.Schemas.CustomPropertyValue.ValuePayload? = nil - ) { - self.propertyName = propertyName - self.value = value - } - public enum CodingKeys: String, CodingKey { - case propertyName = "property_name" - case value - } - } /// A repository on GitHub. /// /// - Remark: Generated from `#/components/schemas/nullable-repository`. @@ -21838,23 +21555,306 @@ public enum Components { case caaError = "caa_error" } } - /// - Remark: Generated from `#/components/schemas/pages-health-check/alt_domain`. - public var altDomain: Components.Schemas.PagesHealthCheck.AltDomainPayload? - /// Creates a new `PagesHealthCheck`. + /// - Remark: Generated from `#/components/schemas/pages-health-check/alt_domain`. + public var altDomain: Components.Schemas.PagesHealthCheck.AltDomainPayload? + /// Creates a new `PagesHealthCheck`. + /// + /// - Parameters: + /// - domain: + /// - altDomain: + public init( + domain: Components.Schemas.PagesHealthCheck.DomainPayload? = nil, + altDomain: Components.Schemas.PagesHealthCheck.AltDomainPayload? = nil + ) { + self.domain = domain + self.altDomain = altDomain + } + public enum CodingKeys: String, CodingKey { + case domain + case altDomain = "alt_domain" + } + } + /// Data related to a release. + /// + /// - Remark: Generated from `#/components/schemas/release-asset`. + public struct ReleaseAsset: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/release-asset/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/release-asset/browser_download_url`. + public var browserDownloadUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/release-asset/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/release-asset/node_id`. + public var nodeId: Swift.String + /// The file name of the asset. + /// + /// - Remark: Generated from `#/components/schemas/release-asset/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/release-asset/label`. + public var label: Swift.String? + /// State of the release asset. + /// + /// - Remark: Generated from `#/components/schemas/release-asset/state`. + @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { + case uploaded = "uploaded" + case open = "open" + } + /// State of the release asset. + /// + /// - Remark: Generated from `#/components/schemas/release-asset/state`. + public var state: Components.Schemas.ReleaseAsset.StatePayload + /// - Remark: Generated from `#/components/schemas/release-asset/content_type`. + public var contentType: Swift.String + /// - Remark: Generated from `#/components/schemas/release-asset/size`. + public var size: Swift.Int + /// - Remark: Generated from `#/components/schemas/release-asset/digest`. + public var digest: Swift.String? + /// - Remark: Generated from `#/components/schemas/release-asset/download_count`. + public var downloadCount: Swift.Int + /// - Remark: Generated from `#/components/schemas/release-asset/created_at`. + public var createdAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/release-asset/updated_at`. + public var updatedAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/release-asset/uploader`. + public var uploader: Components.Schemas.NullableSimpleUser? + /// Creates a new `ReleaseAsset`. + /// + /// - Parameters: + /// - url: + /// - browserDownloadUrl: + /// - id: + /// - nodeId: + /// - name: The file name of the asset. + /// - label: + /// - state: State of the release asset. + /// - contentType: + /// - size: + /// - digest: + /// - downloadCount: + /// - createdAt: + /// - updatedAt: + /// - uploader: + public init( + url: Swift.String, + browserDownloadUrl: Swift.String, + id: Swift.Int, + nodeId: Swift.String, + name: Swift.String, + label: Swift.String? = nil, + state: Components.Schemas.ReleaseAsset.StatePayload, + contentType: Swift.String, + size: Swift.Int, + digest: Swift.String? = nil, + downloadCount: Swift.Int, + createdAt: Foundation.Date, + updatedAt: Foundation.Date, + uploader: Components.Schemas.NullableSimpleUser? = nil + ) { + self.url = url + self.browserDownloadUrl = browserDownloadUrl + self.id = id + self.nodeId = nodeId + self.name = name + self.label = label + self.state = state + self.contentType = contentType + self.size = size + self.digest = digest + self.downloadCount = downloadCount + self.createdAt = createdAt + self.updatedAt = updatedAt + self.uploader = uploader + } + public enum CodingKeys: String, CodingKey { + case url + case browserDownloadUrl = "browser_download_url" + case id + case nodeId = "node_id" + case name + case label + case state + case contentType = "content_type" + case size + case digest + case downloadCount = "download_count" + case createdAt = "created_at" + case updatedAt = "updated_at" + case uploader + } + } + /// A release. + /// + /// - Remark: Generated from `#/components/schemas/release`. + public struct Release: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/release/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/release/html_url`. + public var htmlUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/release/assets_url`. + public var assetsUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/release/upload_url`. + public var uploadUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/release/tarball_url`. + public var tarballUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/release/zipball_url`. + public var zipballUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/release/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/release/node_id`. + public var nodeId: Swift.String + /// The name of the tag. + /// + /// - Remark: Generated from `#/components/schemas/release/tag_name`. + public var tagName: Swift.String + /// Specifies the commitish value that determines where the Git tag is created from. + /// + /// - Remark: Generated from `#/components/schemas/release/target_commitish`. + public var targetCommitish: Swift.String + /// - Remark: Generated from `#/components/schemas/release/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/release/body`. + public var body: Swift.String? + /// true to create a draft (unpublished) release, false to create a published one. + /// + /// - Remark: Generated from `#/components/schemas/release/draft`. + public var draft: Swift.Bool + /// Whether to identify the release as a prerelease or a full release. + /// + /// - Remark: Generated from `#/components/schemas/release/prerelease`. + public var prerelease: Swift.Bool + /// Whether or not the release is immutable. + /// + /// - Remark: Generated from `#/components/schemas/release/immutable`. + public var immutable: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/release/created_at`. + public var createdAt: Foundation.Date + /// - Remark: Generated from `#/components/schemas/release/published_at`. + public var publishedAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/release/updated_at`. + public var updatedAt: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/release/author`. + public var author: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/release/assets`. + public var assets: [Components.Schemas.ReleaseAsset] + /// - Remark: Generated from `#/components/schemas/release/body_html`. + public var bodyHtml: Swift.String? + /// - Remark: Generated from `#/components/schemas/release/body_text`. + public var bodyText: Swift.String? + /// - Remark: Generated from `#/components/schemas/release/mentions_count`. + public var mentionsCount: Swift.Int? + /// The URL of the release discussion. + /// + /// - Remark: Generated from `#/components/schemas/release/discussion_url`. + public var discussionUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/release/reactions`. + public var reactions: Components.Schemas.ReactionRollup? + /// Creates a new `Release`. /// /// - Parameters: - /// - domain: - /// - altDomain: + /// - url: + /// - htmlUrl: + /// - assetsUrl: + /// - uploadUrl: + /// - tarballUrl: + /// - zipballUrl: + /// - id: + /// - nodeId: + /// - tagName: The name of the tag. + /// - targetCommitish: Specifies the commitish value that determines where the Git tag is created from. + /// - name: + /// - body: + /// - draft: true to create a draft (unpublished) release, false to create a published one. + /// - prerelease: Whether to identify the release as a prerelease or a full release. + /// - immutable: Whether or not the release is immutable. + /// - createdAt: + /// - publishedAt: + /// - updatedAt: + /// - author: + /// - assets: + /// - bodyHtml: + /// - bodyText: + /// - mentionsCount: + /// - discussionUrl: The URL of the release discussion. + /// - reactions: public init( - domain: Components.Schemas.PagesHealthCheck.DomainPayload? = nil, - altDomain: Components.Schemas.PagesHealthCheck.AltDomainPayload? = nil + url: Swift.String, + htmlUrl: Swift.String, + assetsUrl: Swift.String, + uploadUrl: Swift.String, + tarballUrl: Swift.String? = nil, + zipballUrl: Swift.String? = nil, + id: Swift.Int, + nodeId: Swift.String, + tagName: Swift.String, + targetCommitish: Swift.String, + name: Swift.String? = nil, + body: Swift.String? = nil, + draft: Swift.Bool, + prerelease: Swift.Bool, + immutable: Swift.Bool? = nil, + createdAt: Foundation.Date, + publishedAt: Foundation.Date? = nil, + updatedAt: Foundation.Date? = nil, + author: Components.Schemas.SimpleUser, + assets: [Components.Schemas.ReleaseAsset], + bodyHtml: Swift.String? = nil, + bodyText: Swift.String? = nil, + mentionsCount: Swift.Int? = nil, + discussionUrl: Swift.String? = nil, + reactions: Components.Schemas.ReactionRollup? = nil ) { - self.domain = domain - self.altDomain = altDomain + self.url = url + self.htmlUrl = htmlUrl + self.assetsUrl = assetsUrl + self.uploadUrl = uploadUrl + self.tarballUrl = tarballUrl + self.zipballUrl = zipballUrl + self.id = id + self.nodeId = nodeId + self.tagName = tagName + self.targetCommitish = targetCommitish + self.name = name + self.body = body + self.draft = draft + self.prerelease = prerelease + self.immutable = immutable + self.createdAt = createdAt + self.publishedAt = publishedAt + self.updatedAt = updatedAt + self.author = author + self.assets = assets + self.bodyHtml = bodyHtml + self.bodyText = bodyText + self.mentionsCount = mentionsCount + self.discussionUrl = discussionUrl + self.reactions = reactions } public enum CodingKeys: String, CodingKey { - case domain - case altDomain = "alt_domain" + case url + case htmlUrl = "html_url" + case assetsUrl = "assets_url" + case uploadUrl = "upload_url" + case tarballUrl = "tarball_url" + case zipballUrl = "zipball_url" + case id + case nodeId = "node_id" + case tagName = "tag_name" + case targetCommitish = "target_commitish" + case name + case body + case draft + case prerelease + case immutable + case createdAt = "created_at" + case publishedAt = "published_at" + case updatedAt = "updated_at" + case author + case assets + case bodyHtml = "body_html" + case bodyText = "body_text" + case mentionsCount = "mentions_count" + case discussionUrl = "discussion_url" + case reactions } } /// Generated name and body describing a release @@ -23208,6 +23208,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = 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 comment. /// /// - Remark: Generated from `#/components/parameters/comment-id`. @@ -23220,10 +23224,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery. /// /// - Remark: Generated from `#/components/parameters/hook-id`. @@ -27926,7 +27926,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/after`. public var after: Components.Parameters.PaginationAfter? /// Optional filter for fetching attestations with a given predicate type. - /// This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + /// This option accepts `provenance`, `sbom`, `release`, or freeform text + /// for custom predicate types. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/attestations/{subject_digest}/GET/query/predicate_type`. public var predicateType: Swift.String? From 124eb8b4884f8e47c4c7bfee0f3b163411c2a731 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:07:08 +0000 Subject: [PATCH 15/28] Commit via running: make Sources/secret-scanning --- Sources/secret-scanning/Client.swift | 209 +------------- Sources/secret-scanning/Types.swift | 410 ++------------------------- 2 files changed, 31 insertions(+), 588 deletions(-) diff --git a/Sources/secret-scanning/Client.swift b/Sources/secret-scanning/Client.swift index e3047ab55a..da7e340d4d 100644 --- a/Sources/secret-scanning/Client.swift +++ b/Sources/secret-scanning/Client.swift @@ -38,212 +38,6 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } - /// List secret scanning alerts for an enterprise - /// - /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - /// - /// Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - /// - /// The authenticated user must be a member of the enterprise in order to use this endpoint. - /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/secret-scanning/alerts`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)`. - public func secretScanningListAlertsForEnterprise(_ input: Operations.SecretScanningListAlertsForEnterprise.Input) async throws -> Operations.SecretScanningListAlertsForEnterprise.Output { - try await client.send( - input: input, - forOperation: Operations.SecretScanningListAlertsForEnterprise.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/enterprises/{}/secret-scanning/alerts", - 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: "state", - value: input.query.state - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "secret_type", - value: input.query.secretType - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "resolution", - value: input.query.resolution - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "sort", - value: input.query.sort - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "direction", - value: input.query.direction - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "per_page", - value: input.query.perPage - ) - 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: "validity", - value: input.query.validity - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "is_publicly_leaked", - value: input.query.isPubliclyLeaked - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "is_multi_repo", - value: input.query.isMultiRepo - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "hide_secret", - value: input.query.hideSecret - ) - 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.SecretScanningListAlertsForEnterprise.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.SecretScanningListAlertsForEnterprise.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.OrganizationSecretScanningAlert].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init( - headers: headers, - body: body - )) - case 404: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.NotFound.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 .notFound(.init(body: body)) - case 503: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.ServiceUnavailable.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Responses.ServiceUnavailable.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 - ) - ) - } - } - ) - } /// List secret scanning alerts for an organization /// /// Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. @@ -1379,6 +1173,9 @@ public struct Client: APIProtocol { /// /// Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included. /// + /// > [!NOTE] + /// > This endpoint requires [GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." + /// /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. diff --git a/Sources/secret-scanning/Types.swift b/Sources/secret-scanning/Types.swift index 3fc5279e53..aca48a2859 100644 --- a/Sources/secret-scanning/Types.swift +++ b/Sources/secret-scanning/Types.swift @@ -11,19 +11,6 @@ import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. public protocol APIProtocol: Sendable { - /// List secret scanning alerts for an enterprise - /// - /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - /// - /// Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - /// - /// The authenticated user must be a member of the enterprise in order to use this endpoint. - /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/secret-scanning/alerts`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)`. - func secretScanningListAlertsForEnterprise(_ input: Operations.SecretScanningListAlertsForEnterprise.Input) async throws -> Operations.SecretScanningListAlertsForEnterprise.Output /// List secret scanning alerts for an organization /// /// Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. @@ -112,6 +99,9 @@ public protocol APIProtocol: Sendable { /// /// Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included. /// + /// > [!NOTE] + /// > This endpoint requires [GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." + /// /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. @@ -121,29 +111,6 @@ public protocol APIProtocol: Sendable { /// Convenience overloads for operation inputs. extension APIProtocol { - /// List secret scanning alerts for an enterprise - /// - /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - /// - /// Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - /// - /// The authenticated user must be a member of the enterprise in order to use this endpoint. - /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/secret-scanning/alerts`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)`. - public func secretScanningListAlertsForEnterprise( - path: Operations.SecretScanningListAlertsForEnterprise.Input.Path, - query: Operations.SecretScanningListAlertsForEnterprise.Input.Query = .init(), - headers: Operations.SecretScanningListAlertsForEnterprise.Input.Headers = .init() - ) async throws -> Operations.SecretScanningListAlertsForEnterprise.Output { - try await secretScanningListAlertsForEnterprise(Operations.SecretScanningListAlertsForEnterprise.Input( - path: path, - query: query, - headers: headers - )) - } /// List secret scanning alerts for an organization /// /// Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. @@ -310,6 +277,9 @@ extension APIProtocol { /// /// Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included. /// + /// > [!NOTE] + /// > This endpoint requires [GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." + /// /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. @@ -2782,14 +2752,6 @@ 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 PaginationBefore = 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 PaginationAfter = Swift.String /// The direction to sort the results by. /// /// - Remark: Generated from `#/components/parameters/direction`. @@ -2805,10 +2767,18 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/page`. public typealias Page = Swift.Int - /// The slug version of the enterprise name. + /// The organization name. The name is not case sensitive. /// - /// - Remark: Generated from `#/components/parameters/enterprise`. - public typealias Enterprise = Swift.String + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = 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 /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-state`. @@ -2831,6 +2801,14 @@ public enum Components { case created = "created" case updated = "updated" } + /// 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 events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. + /// + /// - Remark: Generated from `#/components/parameters/secret-scanning-pagination-before-org-repo`. + public typealias SecretScanningPaginationBeforeOrgRepo = 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 events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. + /// + /// - Remark: Generated from `#/components/parameters/secret-scanning-pagination-after-org-repo`. + public typealias SecretScanningPaginationAfterOrgRepo = Swift.String /// A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-validity`. @@ -2847,26 +2825,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-hide-secret`. public typealias SecretScanningAlertHideSecret = Swift.Bool - /// 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`. - public typealias Org = 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 events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. - /// - /// - Remark: Generated from `#/components/parameters/secret-scanning-pagination-before-org-repo`. - public typealias SecretScanningPaginationBeforeOrgRepo = 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 events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. - /// - /// - Remark: Generated from `#/components/parameters/secret-scanning-pagination-after-org-repo`. - public typealias SecretScanningPaginationAfterOrgRepo = Swift.String /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. /// /// - Remark: Generated from `#/components/parameters/alert-number`. @@ -3111,321 +3069,6 @@ public enum Components { /// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. public enum Operations { - /// List secret scanning alerts for an enterprise - /// - /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - /// - /// Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - /// - /// The authenticated user must be a member of the enterprise in order to use this endpoint. - /// - /// OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. - /// - /// - Remark: HTTP `GET /enterprises/{enterprise}/secret-scanning/alerts`. - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)`. - public enum SecretScanningListAlertsForEnterprise { - public static let id: Swift.String = "secret-scanning/list-alerts-for-enterprise" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/path`. - public struct Path: Sendable, Hashable { - /// The slug version of the enterprise name. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/path/enterprise`. - public var enterprise: Components.Parameters.Enterprise - /// Creates a new `Path`. - /// - /// - Parameters: - /// - enterprise: The slug version of the enterprise name. - public init(enterprise: Components.Parameters.Enterprise) { - self.enterprise = enterprise - } - } - public var path: Operations.SecretScanningListAlertsForEnterprise.Input.Path - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-state`. - @frozen public enum SecretScanningAlertState: String, Codable, Hashable, Sendable, CaseIterable { - case open = "open" - case resolved = "resolved" - } - /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/state`. - public var state: Components.Parameters.SecretScanningAlertState? - /// A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. 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`. - public var secretType: Components.Parameters.SecretScanningAlertSecretType? - /// A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/resolution`. - public var resolution: Components.Parameters.SecretScanningAlertResolution? - /// - Remark: Generated from `#/components/parameters/secret-scanning-alert-sort`. - @frozen public enum SecretScanningAlertSort: String, Codable, Hashable, Sendable, CaseIterable { - case created = "created" - case updated = "updated" - } - /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/sort`. - public var sort: Components.Parameters.SecretScanningAlertSort? - /// - Remark: Generated from `#/components/parameters/direction`. - @frozen public enum Direction: String, Codable, Hashable, Sendable, CaseIterable { - case asc = "asc" - case desc = "desc" - } - /// The direction to sort the results by. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/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/enterprises/{enterprise}/secret-scanning/alerts/GET/query/per_page`. - public var perPage: Components.Parameters.PerPage? - /// 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/enterprises/{enterprise}/secret-scanning/alerts/GET/query/before`. - public var before: Components.Parameters.PaginationBefore? - /// 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/enterprises/{enterprise}/secret-scanning/alerts/GET/query/after`. - public var after: Components.Parameters.PaginationAfter? - /// A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/validity`. - public var validity: Components.Parameters.SecretScanningAlertValidity? - /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/is_publicly_leaked`. - public var isPubliclyLeaked: Components.Parameters.SecretScanningAlertPubliclyLeaked? - /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/is_multi_repo`. - public var isMultiRepo: Components.Parameters.SecretScanningAlertMultiRepo? - /// A boolean value representing whether or not to hide literal secrets in the results. - /// - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/query/hide_secret`. - public var hideSecret: Components.Parameters.SecretScanningAlertHideSecret? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - state: Set to `open` or `resolved` to only list secret scanning alerts in a specific state. - /// - secretType: A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. 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. - /// - resolution: A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. - /// - sort: The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. - /// - direction: The direction to sort the results by. - /// - perPage: 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)." - /// - validity: A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`. - /// - isPubliclyLeaked: A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. - /// - isMultiRepo: A boolean value representing whether or not to filter alerts by the multi-repo tag being present. - /// - hideSecret: A boolean value representing whether or not to hide literal secrets in the results. - public init( - state: Components.Parameters.SecretScanningAlertState? = nil, - secretType: Components.Parameters.SecretScanningAlertSecretType? = nil, - resolution: Components.Parameters.SecretScanningAlertResolution? = nil, - sort: Components.Parameters.SecretScanningAlertSort? = nil, - direction: Components.Parameters.Direction? = nil, - perPage: Components.Parameters.PerPage? = nil, - before: Components.Parameters.PaginationBefore? = nil, - after: Components.Parameters.PaginationAfter? = nil, - validity: Components.Parameters.SecretScanningAlertValidity? = nil, - isPubliclyLeaked: Components.Parameters.SecretScanningAlertPubliclyLeaked? = nil, - isMultiRepo: Components.Parameters.SecretScanningAlertMultiRepo? = nil, - hideSecret: Components.Parameters.SecretScanningAlertHideSecret? = nil - ) { - self.state = state - self.secretType = secretType - self.resolution = resolution - self.sort = sort - self.direction = direction - self.perPage = perPage - self.before = before - self.after = after - self.validity = validity - self.isPubliclyLeaked = isPubliclyLeaked - self.isMultiRepo = isMultiRepo - self.hideSecret = hideSecret - } - } - public var query: Operations.SecretScanningListAlertsForEnterprise.Input.Query - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/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.SecretScanningListAlertsForEnterprise.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - query: - /// - headers: - public init( - path: Operations.SecretScanningListAlertsForEnterprise.Input.Path, - query: Operations.SecretScanningListAlertsForEnterprise.Input.Query = .init(), - headers: Operations.SecretScanningListAlertsForEnterprise.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}/secret-scanning/alerts/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/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.SecretScanningListAlertsForEnterprise.Output.Ok.Headers - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/enterprises/{enterprise}/secret-scanning/alerts/GET/responses/200/content/application\/json`. - case json([Components.Schemas.OrganizationSecretScanningAlert]) - /// 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.OrganizationSecretScanningAlert] { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.SecretScanningListAlertsForEnterprise.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - headers: Received HTTP response headers - /// - body: Received HTTP response body - public init( - headers: Operations.SecretScanningListAlertsForEnterprise.Output.Ok.Headers = .init(), - body: Operations.SecretScanningListAlertsForEnterprise.Output.Ok.Body - ) { - self.headers = headers - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.SecretScanningListAlertsForEnterprise.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.SecretScanningListAlertsForEnterprise.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//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.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: Components.Responses.NotFound { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } - } - /// Service unavailable - /// - /// - Remark: Generated from `#/paths//enterprises/{enterprise}/secret-scanning/alerts/get(secret-scanning/list-alerts-for-enterprise)/responses/503`. - /// - /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Components.Responses.ServiceUnavailable) - /// 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.ServiceUnavailable { - 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 - ] - } - } - } /// List secret scanning alerts for an organization /// /// Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. @@ -5787,6 +5430,9 @@ public enum Operations { /// /// Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included. /// + /// > [!NOTE] + /// > This endpoint requires [GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security)." + /// /// OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}/secret-scanning/scan-history`. From a67c692684cab57e007d1d3c4dc31e698b6979df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:07:32 +0000 Subject: [PATCH 16/28] Commit via running: make 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 dff5ebdce8..6ecd3e5bcc 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -5464,6 +5464,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The slug of the team name. /// /// - Remark: Generated from `#/components/parameters/team-slug`. @@ -5476,10 +5480,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The number that identifies the discussion. /// /// - Remark: Generated from `#/components/parameters/discussion-number`. From ce8bbe67f0ad7d1d2de45530eaab19a3e39e48a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:07:55 +0000 Subject: [PATCH 17/28] Commit via running: make Sources/users --- Sources/users/Types.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/users/Types.swift b/Sources/users/Types.swift index 7bfad928dc..4f069d3dc8 100644 --- a/Sources/users/Types.swift +++ b/Sources/users/Types.swift @@ -11485,7 +11485,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/attestations/bulk-list/POST/requestBody/json/subject_digests`. public var subjectDigests: [Swift.String] /// Optional filter for fetching attestations with a given predicate type. - /// This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + /// This option accepts `provenance`, `sbom`, `release`, or freeform text + /// for custom predicate types. /// /// - Remark: Generated from `#/paths/users/{username}/attestations/bulk-list/POST/requestBody/json/predicate_type`. public var predicateType: Swift.String? @@ -12464,7 +12465,8 @@ public enum Operations { /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/query/after`. public var after: Components.Parameters.PaginationAfter? /// Optional filter for fetching attestations with a given predicate type. - /// This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + /// This option accepts `provenance`, `sbom`, `release`, or freeform text + /// for custom predicate types. /// /// - Remark: Generated from `#/paths/users/{username}/attestations/{subject_digest}/GET/query/predicate_type`. public var predicateType: Swift.String? From f4f5065e9555bbfcf8cdefa5d18ec0d71a14f18a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:08:18 +0000 Subject: [PATCH 18/28] Commit via running: make 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 9c27ee78fe..9b8a0de7c8 100644 --- a/Sources/codespaces/Types.swift +++ b/Sources/codespaces/Types.swift @@ -6410,6 +6410,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/username`. public typealias Username = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -6418,10 +6422,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String /// The name of the secret. /// /// - Remark: Generated from `#/components/parameters/secret-name`. From d597f72b30daa1f4253c380a6f3847be0a40feac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:08:41 +0000 Subject: [PATCH 19/28] Commit via running: make Sources/copilot --- Sources/copilot/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 0359223071..8c432ff213 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -2458,14 +2458,14 @@ 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 TeamSlug = Swift.String /// The organization name. The name is not case sensitive. /// /// - 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 TeamSlug = Swift.String } /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} From 977fc2ded0983774eda449e06c6c2eb87c7ec835 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:09:04 +0000 Subject: [PATCH 20/28] Commit via running: make 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 e428d2d54c..40b470ef71 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -6388,6 +6388,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/ghsa_id`. public typealias GhsaId = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -6396,10 +6400,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String } /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} From ce08c70bdaf615160a7da6b5629a523f0d0005cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:09:27 +0000 Subject: [PATCH 21/28] Commit via running: make Sources/interactions --- Sources/interactions/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/interactions/Types.swift b/Sources/interactions/Types.swift index 43900c98f7..db325da164 100644 --- a/Sources/interactions/Types.swift +++ b/Sources/interactions/Types.swift @@ -420,6 +420,10 @@ public enum Components { } /// Types generated from the `#/components/parameters` section of the OpenAPI document. public enum Parameters { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -428,10 +432,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String } /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} From a476bf5ec19c7ba6f3d474183b707afa199175fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:10:36 +0000 Subject: [PATCH 22/28] Commit via running: make Sources/enterprise-teams --- Sources/enterprise-teams/Types.swift | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Sources/enterprise-teams/Types.swift b/Sources/enterprise-teams/Types.swift index 239252f73f..aa064f3ebc 100644 --- a/Sources/enterprise-teams/Types.swift +++ b/Sources/enterprise-teams/Types.swift @@ -620,6 +620,26 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/POST/requestBody/json/sync_to_organizations`. public var syncToOrganizations: Operations.EnterpriseTeamsCreate.Input.Body.JsonPayload.SyncToOrganizationsPayload? + /// Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. + /// `disabled`: The team is not assigned to any organizations. This is the default when you create a new team. + /// `selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments) endpoint. + /// `all`: The team is assigned to all current and future organizations in the enterprise. + /// + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/POST/requestBody/json/organization_selection_type`. + @frozen public enum OrganizationSelectionTypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case disabled = "disabled" + case selected = "selected" + case all = "all" + } + /// Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. + /// `disabled`: The team is not assigned to any organizations. This is the default when you create a new team. + /// `selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments) endpoint. + /// `all`: The team is assigned to all current and future organizations in the enterprise. + /// + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/POST/requestBody/json/organization_selection_type`. + public var organizationSelectionType: Operations.EnterpriseTeamsCreate.Input.Body.JsonPayload.OrganizationSelectionTypePayload? /// The ID of the IdP group to assign team membership with. You can get this value from the [REST API endpoints for SCIM](https://docs.github.com/rest/scim#list-provisioned-scim-groups-for-an-enterprise). /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/POST/requestBody/json/group_id`. @@ -630,22 +650,26 @@ public enum Operations { /// - name: The name of the team. /// - description: A description of the team. /// - syncToOrganizations: Retired: this field is no longer supported. + /// - organizationSelectionType: Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. /// - groupId: The ID of the IdP group to assign team membership with. You can get this value from the [REST API endpoints for SCIM](https://docs.github.com/rest/scim#list-provisioned-scim-groups-for-an-enterprise). public init( name: Swift.String, description: Swift.String? = nil, syncToOrganizations: Operations.EnterpriseTeamsCreate.Input.Body.JsonPayload.SyncToOrganizationsPayload? = nil, + organizationSelectionType: Operations.EnterpriseTeamsCreate.Input.Body.JsonPayload.OrganizationSelectionTypePayload? = nil, groupId: Swift.String? = nil ) { self.name = name self.description = description self.syncToOrganizations = syncToOrganizations + self.organizationSelectionType = organizationSelectionType self.groupId = groupId } public enum CodingKeys: String, CodingKey { case name case description case syncToOrganizations = "sync_to_organizations" + case organizationSelectionType = "organization_selection_type" case groupId = "group_id" } } @@ -1009,6 +1033,26 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{team_slug}/PATCH/requestBody/json/sync_to_organizations`. public var syncToOrganizations: Operations.EnterpriseTeamsUpdate.Input.Body.JsonPayload.SyncToOrganizationsPayload? + /// Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. + /// `disabled`: The team is not assigned to any organizations. This is the default when you create a new team. + /// `selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments). + /// `all`: The team is assigned to all current and future organizations in the enterprise. + /// + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{team_slug}/PATCH/requestBody/json/organization_selection_type`. + @frozen public enum OrganizationSelectionTypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case disabled = "disabled" + case selected = "selected" + case all = "all" + } + /// Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. + /// `disabled`: The team is not assigned to any organizations. This is the default when you create a new team. + /// `selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments). + /// `all`: The team is assigned to all current and future organizations in the enterprise. + /// + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{team_slug}/PATCH/requestBody/json/organization_selection_type`. + public var organizationSelectionType: Operations.EnterpriseTeamsUpdate.Input.Body.JsonPayload.OrganizationSelectionTypePayload? /// The ID of the IdP group to assign team membership with. The new IdP group will replace the existing one, or replace existing direct members if the team isn't currently linked to an IdP group. /// /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{team_slug}/PATCH/requestBody/json/group_id`. @@ -1019,22 +1063,26 @@ public enum Operations { /// - name: A new name for the team. /// - description: A new description for the team. /// - syncToOrganizations: Retired: this field is no longer supported. + /// - organizationSelectionType: Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. /// - groupId: The ID of the IdP group to assign team membership with. The new IdP group will replace the existing one, or replace existing direct members if the team isn't currently linked to an IdP group. public init( name: Swift.String? = nil, description: Swift.String? = nil, syncToOrganizations: Operations.EnterpriseTeamsUpdate.Input.Body.JsonPayload.SyncToOrganizationsPayload? = nil, + organizationSelectionType: Operations.EnterpriseTeamsUpdate.Input.Body.JsonPayload.OrganizationSelectionTypePayload? = nil, groupId: Swift.String? = nil ) { self.name = name self.description = description self.syncToOrganizations = syncToOrganizations + self.organizationSelectionType = organizationSelectionType self.groupId = groupId } public enum CodingKeys: String, CodingKey { case name case description case syncToOrganizations = "sync_to_organizations" + case organizationSelectionType = "organization_selection_type" case groupId = "group_id" } } From b2fa49ed36a85d3002c622fa9ae3553eb8ca204a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:11:22 +0000 Subject: [PATCH 23/28] Commit via running: make Sources/enterprise-team-organizations --- .../Client.swift | 420 ++++++ .../enterprise-team-organizations/Types.swift | 1159 +++++++++++++++++ 2 files changed, 1579 insertions(+) create mode 100644 Sources/enterprise-team-organizations/Client.swift create mode 100644 Sources/enterprise-team-organizations/Types.swift diff --git a/Sources/enterprise-team-organizations/Client.swift b/Sources/enterprise-team-organizations/Client.swift new file mode 100644 index 0000000000..9359b54b36 --- /dev/null +++ b/Sources/enterprise-team-organizations/Client.swift @@ -0,0 +1,420 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +import HTTPTypes +/// GitHub's v3 REST API. +public struct Client: APIProtocol { + /// The underlying HTTP client. + private let client: UniversalClient + /// Creates a new client. + /// - Parameters: + /// - serverURL: The server URL that the client connects to. Any server + /// URLs defined in the OpenAPI document are available as static methods + /// on the ``Servers`` type. + /// - configuration: A set of configuration values for the client. + /// - transport: A transport that performs HTTP operations. + /// - middlewares: A list of middlewares to call before the transport. + public init( + serverURL: Foundation.URL, + configuration: Configuration = .init(), + transport: any ClientTransport, + middlewares: [any ClientMiddleware] = [] + ) { + self.client = .init( + serverURL: serverURL, + configuration: configuration, + transport: transport, + middlewares: middlewares + ) + } + private var converter: Converter { + client.converter + } + /// Get organization assignments + /// + /// Get all organizations assigned to an enterprise team + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/get(enterprise-team-organizations/get-assignments)`. + public func enterpriseTeamOrganizationsGetAssignments(_ input: Operations.EnterpriseTeamOrganizationsGetAssignments.Input) async throws -> Operations.EnterpriseTeamOrganizationsGetAssignments.Output { + try await client.send( + input: input, + forOperation: Operations.EnterpriseTeamOrganizationsGetAssignments.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/teams/{}/organizations", + parameters: [ + input.path.enterprise, + input.path.enterpriseTeam + ] + ) + 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.perPage + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: true, + name: "page", + value: input.query.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.EnterpriseTeamOrganizationsGetAssignments.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.OrganizationSimple].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 + ) + ) + } + } + ) + } + /// Add organization assignments + /// + /// Assign an enterprise team to multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/post(enterprise-team-organizations/bulk-add)`. + public func enterpriseTeamOrganizationsBulkAdd(_ input: Operations.EnterpriseTeamOrganizationsBulkAdd.Input) async throws -> Operations.EnterpriseTeamOrganizationsBulkAdd.Output { + try await client.send( + input: input, + forOperation: Operations.EnterpriseTeamOrganizationsBulkAdd.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/teams/{}/organizations/add", + parameters: [ + input.path.enterprise, + input.path.enterpriseTeam + ] + ) + 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.EnterpriseTeamOrganizationsBulkAdd.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.OrganizationSimple].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 + ) + ) + } + } + ) + } + /// Remove organization assignments + /// + /// Unassign an enterprise team from multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/post(enterprise-team-organizations/bulk-remove)`. + public func enterpriseTeamOrganizationsBulkRemove(_ input: Operations.EnterpriseTeamOrganizationsBulkRemove.Input) async throws -> Operations.EnterpriseTeamOrganizationsBulkRemove.Output { + try await client.send( + input: input, + forOperation: Operations.EnterpriseTeamOrganizationsBulkRemove.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/teams/{}/organizations/remove", + parameters: [ + input.path.enterprise, + input.path.enterpriseTeam + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + 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()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Get organization assignment + /// + /// Check if an enterprise team is assigned to an organization + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)`. + public func enterpriseTeamOrganizationsGetAssignment(_ input: Operations.EnterpriseTeamOrganizationsGetAssignment.Input) async throws -> Operations.EnterpriseTeamOrganizationsGetAssignment.Output { + try await client.send( + input: input, + forOperation: Operations.EnterpriseTeamOrganizationsGetAssignment.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/teams/{}/organizations/{}", + parameters: [ + input.path.enterprise, + input.path.enterpriseTeam, + 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.EnterpriseTeamOrganizationsGetAssignment.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.OrganizationSimple.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 404: + return .notFound(.init()) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// Add an organization assignment + /// + /// Assign an enterprise team to an organization. + /// + /// - Remark: HTTP `PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/put(enterprise-team-organizations/add)`. + public func enterpriseTeamOrganizationsAdd(_ input: Operations.EnterpriseTeamOrganizationsAdd.Input) async throws -> Operations.EnterpriseTeamOrganizationsAdd.Output { + try await client.send( + input: input, + forOperation: Operations.EnterpriseTeamOrganizationsAdd.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/teams/{}/organizations/{}", + parameters: [ + input.path.enterprise, + input.path.enterpriseTeam, + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .put + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.EnterpriseTeamOrganizationsAdd.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.OrganizationSimple.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 + ) + ) + } + } + ) + } + /// Delete an organization assignment + /// + /// Unassign an enterprise team from an organization. + /// + /// - Remark: HTTP `DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/delete(enterprise-team-organizations/delete)`. + public func enterpriseTeamOrganizationsDelete(_ input: Operations.EnterpriseTeamOrganizationsDelete.Input) async throws -> Operations.EnterpriseTeamOrganizationsDelete.Output { + try await client.send( + input: input, + forOperation: Operations.EnterpriseTeamOrganizationsDelete.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/enterprises/{}/teams/{}/organizations/{}", + parameters: [ + input.path.enterprise, + input.path.enterpriseTeam, + input.path.org + ] + ) + 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 + ) + ) + } + } + ) + } +} diff --git a/Sources/enterprise-team-organizations/Types.swift b/Sources/enterprise-team-organizations/Types.swift new file mode 100644 index 0000000000..0f896b98b1 --- /dev/null +++ b/Sources/enterprise-team-organizations/Types.swift @@ -0,0 +1,1159 @@ +// Generated by swift-openapi-generator, do not modify. +@_spi(Generated) import OpenAPIRuntime +#if os(Linux) +@preconcurrency import struct Foundation.URL +@preconcurrency import struct Foundation.Data +@preconcurrency import struct Foundation.Date +#else +import struct Foundation.URL +import struct Foundation.Data +import struct Foundation.Date +#endif +/// A type that performs HTTP operations defined by the OpenAPI document. +public protocol APIProtocol: Sendable { + /// Get organization assignments + /// + /// Get all organizations assigned to an enterprise team + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/get(enterprise-team-organizations/get-assignments)`. + func enterpriseTeamOrganizationsGetAssignments(_ input: Operations.EnterpriseTeamOrganizationsGetAssignments.Input) async throws -> Operations.EnterpriseTeamOrganizationsGetAssignments.Output + /// Add organization assignments + /// + /// Assign an enterprise team to multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/post(enterprise-team-organizations/bulk-add)`. + func enterpriseTeamOrganizationsBulkAdd(_ input: Operations.EnterpriseTeamOrganizationsBulkAdd.Input) async throws -> Operations.EnterpriseTeamOrganizationsBulkAdd.Output + /// Remove organization assignments + /// + /// Unassign an enterprise team from multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/post(enterprise-team-organizations/bulk-remove)`. + func enterpriseTeamOrganizationsBulkRemove(_ input: Operations.EnterpriseTeamOrganizationsBulkRemove.Input) async throws -> Operations.EnterpriseTeamOrganizationsBulkRemove.Output + /// Get organization assignment + /// + /// Check if an enterprise team is assigned to an organization + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)`. + func enterpriseTeamOrganizationsGetAssignment(_ input: Operations.EnterpriseTeamOrganizationsGetAssignment.Input) async throws -> Operations.EnterpriseTeamOrganizationsGetAssignment.Output + /// Add an organization assignment + /// + /// Assign an enterprise team to an organization. + /// + /// - Remark: HTTP `PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/put(enterprise-team-organizations/add)`. + func enterpriseTeamOrganizationsAdd(_ input: Operations.EnterpriseTeamOrganizationsAdd.Input) async throws -> Operations.EnterpriseTeamOrganizationsAdd.Output + /// Delete an organization assignment + /// + /// Unassign an enterprise team from an organization. + /// + /// - Remark: HTTP `DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/delete(enterprise-team-organizations/delete)`. + func enterpriseTeamOrganizationsDelete(_ input: Operations.EnterpriseTeamOrganizationsDelete.Input) async throws -> Operations.EnterpriseTeamOrganizationsDelete.Output +} + +/// Convenience overloads for operation inputs. +extension APIProtocol { + /// Get organization assignments + /// + /// Get all organizations assigned to an enterprise team + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/get(enterprise-team-organizations/get-assignments)`. + public func enterpriseTeamOrganizationsGetAssignments( + path: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Path, + query: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Query = .init(), + headers: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Headers = .init() + ) async throws -> Operations.EnterpriseTeamOrganizationsGetAssignments.Output { + try await enterpriseTeamOrganizationsGetAssignments(Operations.EnterpriseTeamOrganizationsGetAssignments.Input( + path: path, + query: query, + headers: headers + )) + } + /// Add organization assignments + /// + /// Assign an enterprise team to multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/post(enterprise-team-organizations/bulk-add)`. + public func enterpriseTeamOrganizationsBulkAdd( + path: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Path, + headers: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Headers = .init(), + body: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Body + ) async throws -> Operations.EnterpriseTeamOrganizationsBulkAdd.Output { + try await enterpriseTeamOrganizationsBulkAdd(Operations.EnterpriseTeamOrganizationsBulkAdd.Input( + path: path, + headers: headers, + body: body + )) + } + /// Remove organization assignments + /// + /// Unassign an enterprise team from multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/post(enterprise-team-organizations/bulk-remove)`. + public func enterpriseTeamOrganizationsBulkRemove( + path: Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Path, + body: Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Body + ) async throws -> Operations.EnterpriseTeamOrganizationsBulkRemove.Output { + try await enterpriseTeamOrganizationsBulkRemove(Operations.EnterpriseTeamOrganizationsBulkRemove.Input( + path: path, + body: body + )) + } + /// Get organization assignment + /// + /// Check if an enterprise team is assigned to an organization + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)`. + public func enterpriseTeamOrganizationsGetAssignment( + path: Operations.EnterpriseTeamOrganizationsGetAssignment.Input.Path, + headers: Operations.EnterpriseTeamOrganizationsGetAssignment.Input.Headers = .init() + ) async throws -> Operations.EnterpriseTeamOrganizationsGetAssignment.Output { + try await enterpriseTeamOrganizationsGetAssignment(Operations.EnterpriseTeamOrganizationsGetAssignment.Input( + path: path, + headers: headers + )) + } + /// Add an organization assignment + /// + /// Assign an enterprise team to an organization. + /// + /// - Remark: HTTP `PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/put(enterprise-team-organizations/add)`. + public func enterpriseTeamOrganizationsAdd( + path: Operations.EnterpriseTeamOrganizationsAdd.Input.Path, + headers: Operations.EnterpriseTeamOrganizationsAdd.Input.Headers = .init() + ) async throws -> Operations.EnterpriseTeamOrganizationsAdd.Output { + try await enterpriseTeamOrganizationsAdd(Operations.EnterpriseTeamOrganizationsAdd.Input( + path: path, + headers: headers + )) + } + /// Delete an organization assignment + /// + /// Unassign an enterprise team from an organization. + /// + /// - Remark: HTTP `DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/delete(enterprise-team-organizations/delete)`. + public func enterpriseTeamOrganizationsDelete(path: Operations.EnterpriseTeamOrganizationsDelete.Input.Path) async throws -> Operations.EnterpriseTeamOrganizationsDelete.Output { + try await enterpriseTeamOrganizationsDelete(Operations.EnterpriseTeamOrganizationsDelete.Input(path: path)) + } +} + +/// Server URLs defined in the OpenAPI document. +public enum Servers { + public enum Server1 { + public static func url() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } + } + @available(*, deprecated, renamed: "Servers.Server1.url") + public static func server1() throws -> Foundation.URL { + try Foundation.URL( + validatingOpenAPIServerURL: "https://api.github.com", + variables: [] + ) + } +} + +/// 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 { + /// A GitHub organization. + /// + /// - Remark: Generated from `#/components/schemas/organization-simple`. + public struct OrganizationSimple: 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 nodeId: 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 reposUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/events_url`. + public var eventsUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/hooks_url`. + public var hooksUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/issues_url`. + public var issuesUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/members_url`. + public var membersUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/public_members_url`. + public var publicMembersUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/avatar_url`. + public var avatarUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/organization-simple/description`. + public var description: Swift.String? + /// Creates a new `OrganizationSimple`. + /// + /// - Parameters: + /// - login: + /// - id: + /// - nodeId: + /// - url: + /// - reposUrl: + /// - eventsUrl: + /// - hooksUrl: + /// - issuesUrl: + /// - membersUrl: + /// - publicMembersUrl: + /// - avatarUrl: + /// - description: + public init( + login: Swift.String, + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + reposUrl: Swift.String, + eventsUrl: Swift.String, + hooksUrl: Swift.String, + issuesUrl: Swift.String, + membersUrl: Swift.String, + publicMembersUrl: Swift.String, + avatarUrl: Swift.String, + description: Swift.String? = nil + ) { + self.login = login + self.id = id + self.nodeId = nodeId + self.url = url + self.reposUrl = reposUrl + self.eventsUrl = eventsUrl + self.hooksUrl = hooksUrl + self.issuesUrl = issuesUrl + self.membersUrl = membersUrl + self.publicMembersUrl = publicMembersUrl + self.avatarUrl = avatarUrl + self.description = description + } + public enum CodingKeys: String, CodingKey { + case login + case id + case nodeId = "node_id" + case url + case reposUrl = "repos_url" + case eventsUrl = "events_url" + case hooksUrl = "hooks_url" + case issuesUrl = "issues_url" + case membersUrl = "members_url" + case publicMembersUrl = "public_members_url" + case avatarUrl = "avatar_url" + case description + } + } + } + /// Types generated from the `#/components/parameters` section of the OpenAPI document. + public enum Parameters { + /// 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`. + public typealias PerPage = Swift.Int + /// 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 `#/components/parameters/page`. + public typealias Page = Swift.Int + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/components/parameters/enterprise`. + public typealias Enterprise = Swift.String + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/components/parameters/enterprise-team`. + public typealias EnterpriseTeam = Swift.String + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String + } + /// 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 {} + /// 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 { + /// Get organization assignments + /// + /// Get all organizations assigned to an enterprise team + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/get(enterprise-team-organizations/get-assignments)`. + public enum EnterpriseTeamOrganizationsGetAssignments { + public static let id: Swift.String = "enterprise-team-organizations/get-assignments" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/GET/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/GET/path/enterprise`. + public var enterprise: Components.Parameters.Enterprise + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/GET/path/enterprise-team`. + public var enterpriseTeam: Components.Parameters.EnterpriseTeam + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. + /// - enterpriseTeam: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + public init( + enterprise: Components.Parameters.Enterprise, + enterpriseTeam: Components.Parameters.EnterpriseTeam + ) { + self.enterprise = enterprise + self.enterpriseTeam = enterpriseTeam + } + } + public var path: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/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/enterprises/{enterprise}/teams/{enterprise-team}/organizations/GET/query/per_page`. + public var perPage: Components.Parameters.PerPage? + /// 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}/teams/{enterprise-team}/organizations/GET/query/page`. + public var page: Components.Parameters.Page? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - perPage: 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( + perPage: Components.Parameters.PerPage? = nil, + page: Components.Parameters.Page? = nil + ) { + self.perPage = perPage + self.page = page + } + } + public var query: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Query + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/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.EnterpriseTeamOrganizationsGetAssignments.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Path, + query: Operations.EnterpriseTeamOrganizationsGetAssignments.Input.Query = .init(), + headers: Operations.EnterpriseTeamOrganizationsGetAssignments.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}/teams/{enterprise-team}/organizations/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/GET/responses/200/content/application\/json`. + case json([Components.Schemas.OrganizationSimple]) + /// 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.OrganizationSimple] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.EnterpriseTeamOrganizationsGetAssignments.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.EnterpriseTeamOrganizationsGetAssignments.Output.Ok.Body) { + self.body = body + } + } + /// An array of organizations the team is assigned to + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/get(enterprise-team-organizations/get-assignments)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.EnterpriseTeamOrganizationsGetAssignments.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.EnterpriseTeamOrganizationsGetAssignments.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 + ] + } + } + } + /// Add organization assignments + /// + /// Assign an enterprise team to multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/post(enterprise-team-organizations/bulk-add)`. + public enum EnterpriseTeamOrganizationsBulkAdd { + public static let id: Swift.String = "enterprise-team-organizations/bulk-add" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/path/enterprise`. + public var enterprise: Components.Parameters.Enterprise + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/path/enterprise-team`. + public var enterpriseTeam: Components.Parameters.EnterpriseTeam + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. + /// - enterpriseTeam: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + public init( + enterprise: Components.Parameters.Enterprise, + enterpriseTeam: Components.Parameters.EnterpriseTeam + ) { + self.enterprise = enterprise + self.enterpriseTeam = enterpriseTeam + } + } + public var path: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/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.EnterpriseTeamOrganizationsBulkAdd.Input.Headers + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// Organization slug to assign the team to. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/requestBody/json/organization_slugs`. + public var organizationSlugs: [Swift.String] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - organizationSlugs: Organization slug to assign the team to. + public init(organizationSlugs: [Swift.String]) { + self.organizationSlugs = organizationSlugs + } + public enum CodingKeys: String, CodingKey { + case organizationSlugs = "organization_slugs" + } + } + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/requestBody/content/application\/json`. + case json(Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Body.JsonPayload) + } + public var body: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Path, + headers: Operations.EnterpriseTeamOrganizationsBulkAdd.Input.Headers = .init(), + body: Operations.EnterpriseTeamOrganizationsBulkAdd.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/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/POST/responses/200/content/application\/json`. + case json([Components.Schemas.OrganizationSimple]) + /// 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.OrganizationSimple] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.EnterpriseTeamOrganizationsBulkAdd.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.EnterpriseTeamOrganizationsBulkAdd.Output.Ok.Body) { + self.body = body + } + } + /// Successfully assigned the enterprise team to organizations. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/add/post(enterprise-team-organizations/bulk-add)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.EnterpriseTeamOrganizationsBulkAdd.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.EnterpriseTeamOrganizationsBulkAdd.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 + ] + } + } + } + /// Remove organization assignments + /// + /// Unassign an enterprise team from multiple organizations. + /// + /// - Remark: HTTP `POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/post(enterprise-team-organizations/bulk-remove)`. + public enum EnterpriseTeamOrganizationsBulkRemove { + public static let id: Swift.String = "enterprise-team-organizations/bulk-remove" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/path/enterprise`. + public var enterprise: Components.Parameters.Enterprise + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/path/enterprise-team`. + public var enterpriseTeam: Components.Parameters.EnterpriseTeam + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. + /// - enterpriseTeam: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + public init( + enterprise: Components.Parameters.Enterprise, + enterpriseTeam: Components.Parameters.EnterpriseTeam + ) { + self.enterprise = enterprise + self.enterpriseTeam = enterpriseTeam + } + } + public var path: Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// Organization slug to unassign the team from. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/requestBody/json/organization_slugs`. + public var organizationSlugs: [Swift.String] + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - organizationSlugs: Organization slug to unassign the team from. + public init(organizationSlugs: [Swift.String]) { + self.organizationSlugs = organizationSlugs + } + public enum CodingKeys: String, CodingKey { + case organizationSlugs = "organization_slugs" + } + } + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/POST/requestBody/content/application\/json`. + case json(Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Body.JsonPayload) + } + public var body: Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - body: + public init( + path: Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Path, + body: Operations.EnterpriseTeamOrganizationsBulkRemove.Input.Body + ) { + self.path = path + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Successfully unassigned the enterprise team from organizations. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/post(enterprise-team-organizations/bulk-remove)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.EnterpriseTeamOrganizationsBulkRemove.Output.NoContent) + /// Successfully unassigned the enterprise team from organizations. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove/post(enterprise-team-organizations/bulk-remove)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// 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.EnterpriseTeamOrganizationsBulkRemove.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 organization assignment + /// + /// Check if an enterprise team is assigned to an organization + /// + /// - Remark: HTTP `GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)`. + public enum EnterpriseTeamOrganizationsGetAssignment { + public static let id: Swift.String = "enterprise-team-organizations/get-assignment" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/GET/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/GET/path/enterprise`. + public var enterprise: Components.Parameters.Enterprise + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/GET/path/enterprise-team`. + public var enterpriseTeam: Components.Parameters.EnterpriseTeam + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/GET/path/org`. + public var org: Components.Parameters.Org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. + /// - enterpriseTeam: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// - org: The organization name. The name is not case sensitive. + public init( + enterprise: Components.Parameters.Enterprise, + enterpriseTeam: Components.Parameters.EnterpriseTeam, + org: Components.Parameters.Org + ) { + self.enterprise = enterprise + self.enterpriseTeam = enterpriseTeam + self.org = org + } + } + public var path: Operations.EnterpriseTeamOrganizationsGetAssignment.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/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.EnterpriseTeamOrganizationsGetAssignment.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.EnterpriseTeamOrganizationsGetAssignment.Input.Path, + headers: Operations.EnterpriseTeamOrganizationsGetAssignment.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.OrganizationSimple) + /// 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.OrganizationSimple { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.EnterpriseTeamOrganizationsGetAssignment.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.EnterpriseTeamOrganizationsGetAssignment.Output.Ok.Body) { + self.body = body + } + } + /// The team is assigned to the organization + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.EnterpriseTeamOrganizationsGetAssignment.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.EnterpriseTeamOrganizationsGetAssignment.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// Creates a new `NotFound`. + public init() {} + } + /// The team is not assigned to the organization + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.EnterpriseTeamOrganizationsGetAssignment.Output.NotFound) + /// The team is not assigned to the organization + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/get(enterprise-team-organizations/get-assignment)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + public static var notFound: Self { + .notFound(.init()) + } + /// 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.EnterpriseTeamOrganizationsGetAssignment.Output.NotFound { + 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 + ] + } + } + } + /// Add an organization assignment + /// + /// Assign an enterprise team to an organization. + /// + /// - Remark: HTTP `PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/put(enterprise-team-organizations/add)`. + public enum EnterpriseTeamOrganizationsAdd { + public static let id: Swift.String = "enterprise-team-organizations/add" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/PUT/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/PUT/path/enterprise`. + public var enterprise: Components.Parameters.Enterprise + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/PUT/path/enterprise-team`. + public var enterpriseTeam: Components.Parameters.EnterpriseTeam + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/PUT/path/org`. + public var org: Components.Parameters.Org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. + /// - enterpriseTeam: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// - org: The organization name. The name is not case sensitive. + public init( + enterprise: Components.Parameters.Enterprise, + enterpriseTeam: Components.Parameters.EnterpriseTeam, + org: Components.Parameters.Org + ) { + self.enterprise = enterprise + self.enterpriseTeam = enterpriseTeam + self.org = org + } + } + public var path: Operations.EnterpriseTeamOrganizationsAdd.Input.Path + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/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.EnterpriseTeamOrganizationsAdd.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.EnterpriseTeamOrganizationsAdd.Input.Path, + headers: Operations.EnterpriseTeamOrganizationsAdd.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/PUT/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/PUT/responses/201/content/application\/json`. + case json(Components.Schemas.OrganizationSimple) + /// 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.OrganizationSimple { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.EnterpriseTeamOrganizationsAdd.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.EnterpriseTeamOrganizationsAdd.Output.Created.Body) { + self.body = body + } + } + /// Successfully assigned the enterprise team to the organization. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/put(enterprise-team-organizations/add)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.EnterpriseTeamOrganizationsAdd.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.EnterpriseTeamOrganizationsAdd.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 + ] + } + } + } + /// Delete an organization assignment + /// + /// Unassign an enterprise team from an organization. + /// + /// - Remark: HTTP `DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}`. + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/delete(enterprise-team-organizations/delete)`. + public enum EnterpriseTeamOrganizationsDelete { + public static let id: Swift.String = "enterprise-team-organizations/delete" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// The slug version of the enterprise name. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/DELETE/path/enterprise`. + public var enterprise: Components.Parameters.Enterprise + /// The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/DELETE/path/enterprise-team`. + public var enterpriseTeam: Components.Parameters.EnterpriseTeam + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/DELETE/path/org`. + public var org: Components.Parameters.Org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - enterprise: The slug version of the enterprise name. + /// - enterpriseTeam: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id. + /// - org: The organization name. The name is not case sensitive. + public init( + enterprise: Components.Parameters.Enterprise, + enterpriseTeam: Components.Parameters.EnterpriseTeam, + org: Components.Parameters.Org + ) { + self.enterprise = enterprise + self.enterpriseTeam = enterpriseTeam + self.org = org + } + } + public var path: Operations.EnterpriseTeamOrganizationsDelete.Input.Path + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + public init(path: Operations.EnterpriseTeamOrganizationsDelete.Input.Path) { + self.path = path + } + } + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Successfully unassigned the enterprise team from the organization. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/delete(enterprise-team-organizations/delete)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.EnterpriseTeamOrganizationsDelete.Output.NoContent) + /// Successfully unassigned the enterprise team from the organization. + /// + /// - Remark: Generated from `#/paths//enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}/delete(enterprise-team-organizations/delete)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// 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.EnterpriseTeamOrganizationsDelete.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) + } + } +} From c265033992536349adbec57d7a6009a65f73b4c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:11:45 +0000 Subject: [PATCH 24/28] Commit via running: make Sources/code-security --- Sources/code-security/Types.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/code-security/Types.swift b/Sources/code-security/Types.swift index ce3846695d..11922d7b0f 100644 --- a/Sources/code-security/Types.swift +++ b/Sources/code-security/Types.swift @@ -1987,6 +1987,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/configuration-id`. public typealias ConfigurationId = Swift.Int + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/components/parameters/org`. + public typealias Org = Swift.String /// The account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -1995,10 +1999,6 @@ public enum Components { /// /// - 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`. - public typealias Org = Swift.String } /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} From 1cbadccb292b6626c4285b03def571bb2abc94f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:13:16 +0000 Subject: [PATCH 25/28] Commit via running: make Sources/campaigns --- Sources/campaigns/Types.swift | 197 +++++++--------------------------- 1 file changed, 38 insertions(+), 159 deletions(-) diff --git a/Sources/campaigns/Types.swift b/Sources/campaigns/Types.swift index e774197069..ef5004dacf 100644 --- a/Sources/campaigns/Types.swift +++ b/Sources/campaigns/Types.swift @@ -1295,169 +1295,48 @@ public enum Operations { /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody`. @frozen public enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// The name of the campaign - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/name`. - public var name: Swift.String - /// A description for the campaign - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/description`. - public var description: Swift.String - /// The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/managers`. - public var managers: [Swift.String]? - /// The slugs of the teams to set as the campaign managers. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/team_managers`. - public var teamManagers: [Swift.String]? - /// The end date and time of the campaign. The date must be in the future. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/ends_at`. - public var endsAt: Foundation.Date - /// The contact link of the campaign. Must be a URI. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/contact_link`. - public var contactLink: Swift.String? - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/CodeScanningAlertsPayload`. - public struct CodeScanningAlertsPayloadPayload: Codable, Hashable, Sendable { - /// The repository id - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/CodeScanningAlertsPayload/repository_id`. - public var repositoryId: Swift.Int - /// The alert numbers - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/CodeScanningAlertsPayload/alert_numbers`. - public var alertNumbers: [Swift.Int] - /// Creates a new `CodeScanningAlertsPayloadPayload`. - /// - /// - Parameters: - /// - repositoryId: The repository id - /// - alertNumbers: The alert numbers - public init( - repositoryId: Swift.Int, - alertNumbers: [Swift.Int] - ) { - self.repositoryId = repositoryId - self.alertNumbers = alertNumbers - } - public enum CodingKeys: String, CodingKey { - case repositoryId = "repository_id" - case alertNumbers = "alert_numbers" - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.repositoryId = try container.decode( - Swift.Int.self, - forKey: .repositoryId - ) - self.alertNumbers = try container.decode( - [Swift.Int].self, - forKey: .alertNumbers - ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "repository_id", - "alert_numbers" - ]) - } - } - /// The code scanning alerts to include in this campaign - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/code_scanning_alerts`. - public typealias CodeScanningAlertsPayload = [Operations.CampaignsCreateCampaign.Input.Body.JsonPayload.CodeScanningAlertsPayloadPayload] - /// The code scanning alerts to include in this campaign - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/code_scanning_alerts`. - public var codeScanningAlerts: Operations.CampaignsCreateCampaign.Input.Body.JsonPayload.CodeScanningAlertsPayload - /// If true, will automatically generate issues for the campaign. The default is false. - /// - /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/generate_issues`. - public var generateIssues: Swift.Bool? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - name: The name of the campaign - /// - description: A description for the campaign - /// - managers: The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied. - /// - teamManagers: The slugs of the teams to set as the campaign managers. - /// - endsAt: The end date and time of the campaign. The date must be in the future. - /// - contactLink: The contact link of the campaign. Must be a URI. - /// - codeScanningAlerts: The code scanning alerts to include in this campaign - /// - generateIssues: If true, will automatically generate issues for the campaign. The default is false. - public init( - name: Swift.String, - description: Swift.String, - managers: [Swift.String]? = nil, - teamManagers: [Swift.String]? = nil, - endsAt: Foundation.Date, - contactLink: Swift.String? = nil, - codeScanningAlerts: Operations.CampaignsCreateCampaign.Input.Body.JsonPayload.CodeScanningAlertsPayload, - generateIssues: Swift.Bool? = nil - ) { - self.name = name - self.description = description - self.managers = managers - self.teamManagers = teamManagers - self.endsAt = endsAt - self.contactLink = contactLink - self.codeScanningAlerts = codeScanningAlerts - self.generateIssues = generateIssues + @frozen public enum JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/case1`. + public struct Case1Payload: Codable, Hashable, Sendable { + /// Creates a new `Case1Payload`. + public init() {} } - public enum CodingKeys: String, CodingKey { - case name - case description - case managers - case teamManagers = "team_managers" - case endsAt = "ends_at" - case contactLink = "contact_link" - case codeScanningAlerts = "code_scanning_alerts" - case generateIssues = "generate_issues" + /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/case1`. + case case1(Operations.CampaignsCreateCampaign.Input.Body.JsonPayload.Case1Payload) + /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/case2`. + public struct Case2Payload: Codable, Hashable, Sendable { + /// Creates a new `Case2Payload`. + public init() {} } + /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/json/case2`. + case case2(Operations.CampaignsCreateCampaign.Input.Body.JsonPayload.Case2Payload) public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.name = try container.decode( - Swift.String.self, - forKey: .name - ) - self.description = try container.decode( - Swift.String.self, - forKey: .description - ) - self.managers = try container.decodeIfPresent( - [Swift.String].self, - forKey: .managers - ) - self.teamManagers = try container.decodeIfPresent( - [Swift.String].self, - forKey: .teamManagers - ) - self.endsAt = try container.decode( - Foundation.Date.self, - forKey: .endsAt - ) - self.contactLink = try container.decodeIfPresent( - Swift.String.self, - forKey: .contactLink - ) - self.codeScanningAlerts = try container.decode( - Operations.CampaignsCreateCampaign.Input.Body.JsonPayload.CodeScanningAlertsPayload.self, - forKey: .codeScanningAlerts - ) - self.generateIssues = try container.decodeIfPresent( - Swift.Bool.self, - forKey: .generateIssues + var errors: [any Error] = [] + do { + self = .case1(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .case2(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors ) - try decoder.ensureNoAdditionalProperties(knownKeys: [ - "name", - "description", - "managers", - "team_managers", - "ends_at", - "contact_link", - "code_scanning_alerts", - "generate_issues" - ]) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .case1(value): + try value.encode(to: encoder) + case let .case2(value): + try value.encode(to: encoder) + } } } /// - Remark: Generated from `#/paths/orgs/{org}/campaigns/POST/requestBody/content/application\/json`. From f978f9765be7bf8294bda58a897c28b10947fadb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:13:39 +0000 Subject: [PATCH 26/28] Commit via running: make Sources/projects --- Sources/projects/Types.swift | 164 +++++++++++++++++++++++++++++++++-- 1 file changed, 156 insertions(+), 8 deletions(-) diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index 8c558f685a..ea34381e5b 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -5926,10 +5926,47 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/q`. public var q: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields`. + @frozen public enum FieldsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields/case2`. + case case2([Swift.String]) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + 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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } /// Limit results to specific fields, by their IDs. If not specified, the title field will be returned. /// + /// Example: `fields[]=123&fields[]=456&fields[]=789` or `fields=123,456,789` + /// /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/GET/query/fields`. - public var fields: [Swift.String]? + public var fields: Operations.ProjectsListItemsForOrg.Input.Query.FieldsPayload? /// 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}/projectsV2/{project_number}/items/GET/query/before`. @@ -5952,7 +5989,7 @@ public enum Operations { /// - perPage: 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( q: Swift.String? = nil, - fields: [Swift.String]? = nil, + fields: Operations.ProjectsListItemsForOrg.Input.Query.FieldsPayload? = nil, before: Components.Parameters.PaginationBefore? = nil, after: Components.Parameters.PaginationAfter? = nil, perPage: Components.Parameters.PerPage? = nil @@ -6475,15 +6512,52 @@ public enum Operations { public var path: Operations.ProjectsGetOrgItem.Input.Path /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query`. public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`. + @frozen public enum FieldsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case2`. + case case2([Swift.String]) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + 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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } /// Limit results to specific fields, by their IDs. If not specified, the title field will be returned. /// + /// Example: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789 + /// /// - Remark: Generated from `#/paths/orgs/{org}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`. - public var fields: [Swift.String]? + public var fields: Operations.ProjectsGetOrgItem.Input.Query.FieldsPayload? /// Creates a new `Query`. /// /// - Parameters: /// - fields: Limit results to specific fields, by their IDs. If not specified, the title field will be returned. - public init(fields: [Swift.String]? = nil) { + public init(fields: Operations.ProjectsGetOrgItem.Input.Query.FieldsPayload? = nil) { self.fields = fields } } @@ -8285,10 +8359,47 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/q`. public var q: Swift.String? + /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields`. + @frozen public enum FieldsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields/case2`. + case case2([Swift.String]) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + 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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } /// Limit results to specific fields, by their IDs. If not specified, the title field will be returned. /// + /// Example: `fields[]=123&fields[]=456&fields[]=789` or `fields=123,456,789` + /// /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/GET/query/fields`. - public var fields: [Swift.String]? + public var fields: Operations.ProjectsListItemsForUser.Input.Query.FieldsPayload? /// Creates a new `Query`. /// /// - Parameters: @@ -8302,7 +8413,7 @@ public enum Operations { after: Components.Parameters.PaginationAfter? = nil, perPage: Components.Parameters.PerPage? = nil, q: Swift.String? = nil, - fields: [Swift.String]? = nil + fields: Operations.ProjectsListItemsForUser.Input.Query.FieldsPayload? = nil ) { self.before = before self.after = after @@ -8822,15 +8933,52 @@ public enum Operations { public var path: Operations.ProjectsGetUserItem.Input.Path /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query`. public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`. + @frozen public enum FieldsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields/case2`. + case case2([Swift.String]) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try decoder.decodeFromSingleValueContainer()) + 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 .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try encoder.encodeToSingleValueContainer(value) + } + } + } /// Limit results to specific fields, by their IDs. If not specified, the title field will be returned. /// + /// Example: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789 + /// /// - Remark: Generated from `#/paths/users/{username}/projectsV2/{project_number}/items/{item_id}/GET/query/fields`. - public var fields: [Swift.String]? + public var fields: Operations.ProjectsGetUserItem.Input.Query.FieldsPayload? /// Creates a new `Query`. /// /// - Parameters: /// - fields: Limit results to specific fields, by their IDs. If not specified, the title field will be returned. - public init(fields: [Swift.String]? = nil) { + public init(fields: Operations.ProjectsGetUserItem.Input.Query.FieldsPayload? = nil) { self.fields = fields } } From fc46084e387636f3fe6f1abade79f663188601c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:13:40 +0000 Subject: [PATCH 27/28] Commit via running: make Package.swift --- Package.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Package.swift b/Package.swift index 43ee15cca5..47ab49678f 100644 --- a/Package.swift +++ b/Package.swift @@ -29,6 +29,7 @@ let package = Package( .library(name: "GitHubRestAPIDesktop", targets: ["GitHubRestAPIDesktop"]), .library(name: "GitHubRestAPIEmojis", targets: ["GitHubRestAPIEmojis"]), .library(name: "GitHubRestAPIEnterprise_Team_Memberships", targets: ["GitHubRestAPIEnterprise_Team_Memberships"]), + .library(name: "GitHubRestAPIEnterprise_Team_Organizations", targets: ["GitHubRestAPIEnterprise_Team_Organizations"]), .library(name: "GitHubRestAPIEnterprise_Teams", targets: ["GitHubRestAPIEnterprise_Teams"]), .library(name: "GitHubRestAPIGists", targets: ["GitHubRestAPIGists"]), .library(name: "GitHubRestAPIGit", targets: ["GitHubRestAPIGit"]), @@ -206,6 +207,14 @@ let package = Package( ], path: "Sources/enterprise-team-memberships" ), + .target( + name: "GitHubRestAPIEnterprise_Team_Organizations", + dependencies: [ + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), + .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"), + ], + path: "Sources/enterprise-team-organizations" + ), .target( name: "GitHubRestAPIEnterprise_Teams", dependencies: [ From 58382e533a6470ad792fa7b621d64e17402023da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 28 Oct 2025 01:13:42 +0000 Subject: [PATCH 28/28] Commit via running: make .spi.yml --- .spi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.spi.yml b/.spi.yml index 94f66a66e0..85b1a64ceb 100644 --- a/.spi.yml +++ b/.spi.yml @@ -20,6 +20,7 @@ builder: - GitHubRestAPIDesktop - GitHubRestAPIEmojis - GitHubRestAPIEnterprise_Team_Memberships + - GitHubRestAPIEnterprise_Team_Organizations - GitHubRestAPIEnterprise_Teams - GitHubRestAPIGists - GitHubRestAPIGit