diff --git a/Sources/actions/Types.swift b/Sources/actions/Types.swift index 38c91f049c..32ef448525 100644 --- a/Sources/actions/Types.swift +++ b/Sources/actions/Types.swift @@ -10108,6 +10108,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -10135,6 +10151,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -10153,6 +10170,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -10171,6 +10189,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -10190,6 +10209,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index 69cc80676a..637a062a8a 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -3620,6 +3620,25 @@ public enum Components { case pinnedBy = "pinned_by" } } + /// Details about why an issue comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized`. + public struct NullableIssueCommentMinimized: Codable, Hashable, Sendable { + /// The reason the comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized/reason`. + public var reason: Swift.String? + /// Creates a new `NullableIssueCommentMinimized`. + /// + /// - Parameters: + /// - reason: The reason the comment was minimized. + public init(reason: Swift.String? = nil) { + self.reason = reason + } + public enum CodingKeys: String, CodingKey { + case reason + } + } /// Comments provide a way for people to collaborate on an issue. /// /// - Remark: Generated from `#/components/schemas/nullable-issue-comment`. @@ -3660,6 +3679,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `NullableIssueComment`. /// /// - Parameters: @@ -3678,6 +3699,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( id: Swift.Int64, nodeId: Swift.String, @@ -3693,7 +3715,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.id = id self.nodeId = nodeId @@ -3710,6 +3733,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case id @@ -3727,6 +3751,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary`. @@ -3772,6 +3797,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`. public var issueFieldId: Swift.Int64 + /// The human-readable name of the issue field. + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_name`. + public var issueFieldName: Swift.String? /// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`. public var nodeId: Swift.String /// The data type of the issue field @@ -3941,6 +3970,7 @@ public enum Components { /// /// - Parameters: /// - issueFieldId: Unique identifier for the issue field. + /// - issueFieldName: The human-readable name of the issue field. /// - nodeId: /// - dataType: The data type of the issue field /// - value: The value of the issue field @@ -3948,6 +3978,7 @@ public enum Components { /// - multiSelectOptions: Details about the selected options public init( issueFieldId: Swift.Int64, + issueFieldName: Swift.String? = nil, nodeId: Swift.String, dataType: Components.Schemas.IssueFieldValue.DataTypePayload, value: Components.Schemas.IssueFieldValue.ValuePayload? = nil, @@ -3955,6 +3986,7 @@ public enum Components { multiSelectOptions: Components.Schemas.IssueFieldValue.MultiSelectOptionsPayload? = nil ) { self.issueFieldId = issueFieldId + self.issueFieldName = issueFieldName self.nodeId = nodeId self.dataType = dataType self.value = value @@ -3963,6 +3995,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case issueFieldId = "issue_field_id" + case issueFieldName = "issue_field_name" case nodeId = "node_id" case dataType = "data_type" case value @@ -4421,6 +4454,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/issue-comment/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/issue-comment/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `IssueComment`. /// /// - Parameters: @@ -4439,6 +4474,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( id: Swift.Int64, nodeId: Swift.String, @@ -4454,7 +4490,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.id = id self.nodeId = nodeId @@ -4471,6 +4508,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case id @@ -4488,6 +4526,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// - Remark: Generated from `#/components/schemas/pull-request-minimal`. diff --git a/Sources/billing/Types.swift b/Sources/billing/Types.swift index 66b0d3dedd..ab09082915 100644 --- a/Sources/billing/Types.swift +++ b/Sources/billing/Types.swift @@ -1415,6 +1415,8 @@ public enum Components { case organization = "organization" case repository = "repository" case costCenter = "cost_center" + case multiUserCustomer = "multi_user_customer" + case user = "user" } /// The type of scope for the budget /// @@ -1424,6 +1426,14 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/update-budget/budget/budget_entity_name`. public var budgetEntityName: Swift.String? + /// The user login when the budget is scoped to a single user (`user` scope). + /// + /// - Remark: Generated from `#/components/schemas/update-budget/budget/user`. + public var user: Swift.String? + /// The consumed amount for the specified user within the budget. Only included for `user`-scoped budgets. + /// + /// - Remark: Generated from `#/components/schemas/update-budget/budget/consumed_amount`. + public var consumedAmount: Swift.Double? /// The budget amount in whole dollars. For license-based products, this represents the number of licenses. /// /// - Remark: Generated from `#/components/schemas/update-budget/budget/budget_amount`. @@ -1520,6 +1530,8 @@ public enum Components { /// - id: ID of the budget. /// - budgetScope: The type of scope for the budget /// - budgetEntityName: The name of the entity to apply the budget to + /// - user: The user login when the budget is scoped to a single user (`user` scope). + /// - consumedAmount: The consumed amount for the specified user within the budget. Only included for `user`-scoped budgets. /// - budgetAmount: The budget amount in whole dollars. For license-based products, this represents the number of licenses. /// - preventFurtherUsage: Whether to prevent additional spending once the budget is exceeded /// - budgetProductSku: A single product or sku to apply the budget to. @@ -1529,6 +1541,8 @@ public enum Components { id: Swift.String? = nil, budgetScope: Components.Schemas.UpdateBudget.BudgetPayload.BudgetScopePayload? = nil, budgetEntityName: Swift.String? = nil, + user: Swift.String? = nil, + consumedAmount: Swift.Double? = nil, budgetAmount: Swift.Int? = nil, preventFurtherUsage: Swift.Bool? = nil, budgetProductSku: Swift.String? = nil, @@ -1538,6 +1552,8 @@ public enum Components { self.id = id self.budgetScope = budgetScope self.budgetEntityName = budgetEntityName + self.user = user + self.consumedAmount = consumedAmount self.budgetAmount = budgetAmount self.preventFurtherUsage = preventFurtherUsage self.budgetProductSku = budgetProductSku @@ -1548,6 +1564,8 @@ public enum Components { case id case budgetScope = "budget_scope" case budgetEntityName = "budget_entity_name" + case user + case consumedAmount = "consumed_amount" case budgetAmount = "budget_amount" case preventFurtherUsage = "prevent_further_usage" case budgetProductSku = "budget_product_sku" diff --git a/Sources/campaigns/Types.swift b/Sources/campaigns/Types.swift index 2a6511c8cd..36ba224130 100644 --- a/Sources/campaigns/Types.swift +++ b/Sources/campaigns/Types.swift @@ -611,6 +611,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -638,6 +654,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -656,6 +673,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -674,6 +692,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -693,6 +712,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/code-quality/Client.swift b/Sources/code-quality/Client.swift index f2e0769e65..3d60b7889b 100644 --- a/Sources/code-quality/Client.swift +++ b/Sources/code-quality/Client.swift @@ -38,6 +38,308 @@ public struct Client: APIProtocol { private var converter: Converter { client.converter } + /// List code quality findings for a repository + /// + /// Lists code quality findings for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)`. + public func codeQualityListFindingsForRepo(_ input: Operations.CodeQualityListFindingsForRepo.Input) async throws -> Operations.CodeQualityListFindingsForRepo.Output { + try await client.send( + input: input, + forOperation: Operations.CodeQualityListFindingsForRepo.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/code-quality/findings", + parameters: [ + input.path.owner, + input.path.repo + ] + ) + 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: "direction", + value: input.query.direction + ) + 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: "state", + value: input.query.state + ) + 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.CodeQualityListFindingsForRepo.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.CodeQualityFinding].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.CodeQualityForbiddenRead.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 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 + ) + ) + } + } + ) + } + /// Get a code quality finding + /// + /// Gets a single code quality finding. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings/{finding_number}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)`. + public func codeQualityGetFinding(_ input: Operations.CodeQualityGetFinding.Input) async throws -> Operations.CodeQualityGetFinding.Output { + try await client.send( + input: input, + forOperation: Operations.CodeQualityGetFinding.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/code-quality/findings/{}", + parameters: [ + input.path.owner, + input.path.repo, + input.path.findingNumber + ] + ) + 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.CodeQualityGetFinding.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.CodeQualityFinding.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.CodeQualityForbiddenRead.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 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 + ) + ) + } + } + ) + } /// Get a code quality setup configuration /// /// Gets a code quality setup configuration. diff --git a/Sources/code-quality/Types.swift b/Sources/code-quality/Types.swift index ddd4e8ddcf..b6a6c5f897 100644 --- a/Sources/code-quality/Types.swift +++ b/Sources/code-quality/Types.swift @@ -11,6 +11,24 @@ import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. public protocol APIProtocol: Sendable { + /// List code quality findings for a repository + /// + /// Lists code quality findings for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)`. + func codeQualityListFindingsForRepo(_ input: Operations.CodeQualityListFindingsForRepo.Input) async throws -> Operations.CodeQualityListFindingsForRepo.Output + /// Get a code quality finding + /// + /// Gets a single code quality finding. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings/{finding_number}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)`. + func codeQualityGetFinding(_ input: Operations.CodeQualityGetFinding.Input) async throws -> Operations.CodeQualityGetFinding.Output /// Get a code quality setup configuration /// /// Gets a code quality setup configuration. @@ -33,6 +51,42 @@ public protocol APIProtocol: Sendable { /// Convenience overloads for operation inputs. extension APIProtocol { + /// List code quality findings for a repository + /// + /// Lists code quality findings for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)`. + public func codeQualityListFindingsForRepo( + path: Operations.CodeQualityListFindingsForRepo.Input.Path, + query: Operations.CodeQualityListFindingsForRepo.Input.Query = .init(), + headers: Operations.CodeQualityListFindingsForRepo.Input.Headers = .init() + ) async throws -> Operations.CodeQualityListFindingsForRepo.Output { + try await codeQualityListFindingsForRepo(Operations.CodeQualityListFindingsForRepo.Input( + path: path, + query: query, + headers: headers + )) + } + /// Get a code quality finding + /// + /// Gets a single code quality finding. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings/{finding_number}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)`. + public func codeQualityGetFinding( + path: Operations.CodeQualityGetFinding.Input.Path, + headers: Operations.CodeQualityGetFinding.Input.Headers = .init() + ) async throws -> Operations.CodeQualityGetFinding.Output { + try await codeQualityGetFinding(Operations.CodeQualityGetFinding.Input( + path: path, + headers: headers + )) + } /// Get a code quality setup configuration /// /// Gets a code quality setup configuration. @@ -141,6 +195,236 @@ public enum Components { try decoder.ensureNoAdditionalProperties(knownKeys: []) } } + /// Code quality rule + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule`. + public struct CodeQualityFindingRule: Codable, Hashable, Sendable { + /// A unique identifier for the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/id`. + public var id: Swift.String + /// The name of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/title`. + public var title: Swift.String + /// A short description of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/description`. + public var description: Swift.String + /// A detailed description of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/help`. + public var help: Swift.String? + /// The severity of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/severity`. + @frozen public enum SeverityPayload: String, Codable, Hashable, Sendable, CaseIterable { + case error = "error" + case warning = "warning" + case note = "note" + case none = "none" + } + /// The severity of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/severity`. + public var severity: Components.Schemas.CodeQualityFindingRule.SeverityPayload + /// The category of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/category`. + @frozen public enum CategoryPayload: String, Codable, Hashable, Sendable, CaseIterable { + case none = "none" + case maintainability = "maintainability" + case reliability = "reliability" + } + /// The category of the rule used to detect the finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-rule/category`. + public var category: Components.Schemas.CodeQualityFindingRule.CategoryPayload + /// Creates a new `CodeQualityFindingRule`. + /// + /// - Parameters: + /// - id: A unique identifier for the rule used to detect the finding. + /// - title: The name of the rule used to detect the finding. + /// - description: A short description of the rule used to detect the finding. + /// - help: A detailed description of the rule used to detect the finding. + /// - severity: The severity of the rule used to detect the finding. + /// - category: The category of the rule used to detect the finding. + public init( + id: Swift.String, + title: Swift.String, + description: Swift.String, + help: Swift.String? = nil, + severity: Components.Schemas.CodeQualityFindingRule.SeverityPayload, + category: Components.Schemas.CodeQualityFindingRule.CategoryPayload + ) { + self.id = id + self.title = title + self.description = description + self.help = help + self.severity = severity + self.category = category + } + public enum CodingKeys: String, CodingKey { + case id + case title + case description + case help + case severity + case category + } + } + /// Code quality file location + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-location`. + public struct CodeQualityFindingLocation: Codable, Hashable, Sendable { + /// The file path where the finding was detected. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-location/path`. + public var path: Swift.String + /// The line number where the finding starts. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-location/start_line`. + public var startLine: Swift.Int? + /// The column number where the finding starts. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-location/start_column`. + public var startColumn: Swift.Int? + /// The line number where the finding ends. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-location/end_line`. + public var endLine: Swift.Int? + /// The column number where the finding ends. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-location/end_column`. + public var endColumn: Swift.Int? + /// Creates a new `CodeQualityFindingLocation`. + /// + /// - Parameters: + /// - path: The file path where the finding was detected. + /// - startLine: The line number where the finding starts. + /// - startColumn: The column number where the finding starts. + /// - endLine: The line number where the finding ends. + /// - endColumn: The column number where the finding ends. + public init( + path: Swift.String, + startLine: Swift.Int? = nil, + startColumn: Swift.Int? = nil, + endLine: Swift.Int? = nil, + endColumn: Swift.Int? = nil + ) { + self.path = path + self.startLine = startLine + self.startColumn = startColumn + self.endLine = endLine + self.endColumn = endColumn + } + public enum CodingKeys: String, CodingKey { + case path + case startLine = "start_line" + case startColumn = "start_column" + case endLine = "end_line" + case endColumn = "end_column" + } + } + /// Code quality finding message + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-message`. + public struct CodeQualityFindingMessage: Codable, Hashable, Sendable { + /// The message text of the code quality finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-message/text`. + public var text: Swift.String + /// The message text of the code quality finding in markdown format. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding-message/markdown`. + public var markdown: Swift.String + /// Creates a new `CodeQualityFindingMessage`. + /// + /// - Parameters: + /// - text: The message text of the code quality finding. + /// - markdown: The message text of the code quality finding in markdown format. + public init( + text: Swift.String, + markdown: Swift.String + ) { + self.text = text + self.markdown = markdown + } + public enum CodingKeys: String, CodingKey { + case text + case markdown + } + } + /// Code quality finding + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding`. + public struct CodeQualityFinding: Codable, Hashable, Sendable { + /// The finding number. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding/number`. + public var number: Swift.Int + /// State of the code quality finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding/state`. + @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { + case open = "open" + case dismissed = "dismissed" + } + /// State of the code quality finding. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding/state`. + public var state: Components.Schemas.CodeQualityFinding.StatePayload + /// The REST API URL of the code quality finding resource. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/code-quality-finding/rule`. + public var rule: Components.Schemas.CodeQualityFindingRule + /// - Remark: Generated from `#/components/schemas/code-quality-finding/location`. + public var location: Components.Schemas.CodeQualityFindingLocation + /// - Remark: Generated from `#/components/schemas/code-quality-finding/message`. + public var message: Components.Schemas.CodeQualityFindingMessage + /// The time the code quality finding was created. + /// + /// - Remark: Generated from `#/components/schemas/code-quality-finding/created_at`. + public var createdAt: Foundation.Date? + /// Creates a new `CodeQualityFinding`. + /// + /// - Parameters: + /// - number: The finding number. + /// - state: State of the code quality finding. + /// - url: The REST API URL of the code quality finding resource. + /// - rule: + /// - location: + /// - message: + /// - createdAt: The time the code quality finding was created. + public init( + number: Swift.Int, + state: Components.Schemas.CodeQualityFinding.StatePayload, + url: Swift.String, + rule: Components.Schemas.CodeQualityFindingRule, + location: Components.Schemas.CodeQualityFindingLocation, + message: Components.Schemas.CodeQualityFindingMessage, + createdAt: Foundation.Date? = nil + ) { + self.number = number + self.state = state + self.url = url + self.rule = rule + self.location = location + self.message = message + self.createdAt = createdAt + } + public enum CodingKeys: String, CodingKey { + case number + case state + case url + case rule + case location + case message + case createdAt = "created_at" + } + } /// Configuration for code quality setup. /// /// - Remark: Generated from `#/components/schemas/code-quality-setup`. @@ -360,6 +644,25 @@ 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`. + @frozen public enum Direction: String, Codable, Hashable, Sendable, CaseIterable { + case asc = "asc" + case desc = "desc" + } + /// 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 account owner of the repository. The name is not case sensitive. /// /// - Remark: Generated from `#/components/parameters/owner`. @@ -368,6 +671,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/repo`. public typealias Repo = Swift.String + /// The number that identifies a finding. + /// + /// - Remark: Generated from `#/components/parameters/code-quality-finding-number`. + public typealias CodeQualityFindingNumber = Swift.Int } /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. public enum RequestBodies {} @@ -577,6 +884,495 @@ public enum Components { /// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. public enum Operations { + /// List code quality findings for a repository + /// + /// Lists code quality findings for a repository. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)`. + public enum CodeQualityListFindingsForRepo { + public static let id: Swift.String = "code-quality/list-findings-for-repo" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/GET/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/GET/path/owner`. + public var owner: Components.Parameters.Owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/GET/path/repo`. + public var repo: Components.Parameters.Repo + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + public init( + owner: Components.Parameters.Owner, + repo: Components.Parameters.Repo + ) { + self.owner = owner + self.repo = repo + } + } + public var path: Operations.CodeQualityListFindingsForRepo.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/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/repos/{owner}/{repo}/code-quality/findings/GET/query/per_page`. + public var perPage: Components.Parameters.PerPage? + /// - 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/repos/{owner}/{repo}/code-quality/findings/GET/query/direction`. + public var direction: Components.Parameters.Direction? + /// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/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/repos/{owner}/{repo}/code-quality/findings/GET/query/after`. + public var after: Components.Parameters.PaginationAfter? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/GET/query/state`. + @frozen public enum StatePayload: String, Codable, Hashable, Sendable, CaseIterable { + case open = "open" + case dismissed = "dismissed" + } + /// If specified, only code quality findings with this state will be returned. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/GET/query/state`. + public var state: Operations.CodeQualityListFindingsForRepo.Input.Query.StatePayload? + /// 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)." + /// - 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)." + /// - state: If specified, only code quality findings with this state will be returned. + public init( + perPage: Components.Parameters.PerPage? = nil, + direction: Components.Parameters.Direction? = nil, + before: Components.Parameters.PaginationBefore? = nil, + after: Components.Parameters.PaginationAfter? = nil, + state: Operations.CodeQualityListFindingsForRepo.Input.Query.StatePayload? = nil + ) { + self.perPage = perPage + self.direction = direction + self.before = before + self.after = after + self.state = state + } + } + public var query: Operations.CodeQualityListFindingsForRepo.Input.Query + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/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.CodeQualityListFindingsForRepo.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.CodeQualityListFindingsForRepo.Input.Path, + query: Operations.CodeQualityListFindingsForRepo.Input.Query = .init(), + headers: Operations.CodeQualityListFindingsForRepo.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/repos/{owner}/{repo}/code-quality/findings/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/GET/responses/200/content/application\/json`. + case json([Components.Schemas.CodeQualityFinding]) + /// 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.CodeQualityFinding] { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CodeQualityListFindingsForRepo.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CodeQualityListFindingsForRepo.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.CodeQualityListFindingsForRepo.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.CodeQualityListFindingsForRepo.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Response if the user is not authorized to access Code quality for this repository. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.CodeQualityForbiddenRead) + /// 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.CodeQualityForbiddenRead { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)/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//repos/{owner}/{repo}/code-quality/findings/get(code-quality/list-findings-for-repo)/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 + ] + } + } + } + /// Get a code quality finding + /// + /// Gets a single code quality finding. + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/code-quality/findings/{finding_number}`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)`. + public enum CodeQualityGetFinding { + public static let id: Swift.String = "code-quality/get-finding" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/GET/path`. + public struct Path: Sendable, Hashable { + /// The account owner of the repository. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/GET/path/owner`. + public var owner: Components.Parameters.Owner + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/GET/path/repo`. + public var repo: Components.Parameters.Repo + /// The number that identifies a finding. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/GET/path/finding_number`. + public var findingNumber: Components.Parameters.CodeQualityFindingNumber + /// Creates a new `Path`. + /// + /// - Parameters: + /// - owner: The account owner of the repository. The name is not case sensitive. + /// - repo: The name of the repository without the `.git` extension. The name is not case sensitive. + /// - findingNumber: The number that identifies a finding. + public init( + owner: Components.Parameters.Owner, + repo: Components.Parameters.Repo, + findingNumber: Components.Parameters.CodeQualityFindingNumber + ) { + self.owner = owner + self.repo = repo + self.findingNumber = findingNumber + } + } + public var path: Operations.CodeQualityGetFinding.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/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.CodeQualityGetFinding.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.CodeQualityGetFinding.Input.Path, + headers: Operations.CodeQualityGetFinding.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/code-quality/findings/{finding_number}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.CodeQualityFinding) + /// 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.CodeQualityFinding { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.CodeQualityGetFinding.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.CodeQualityGetFinding.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.CodeQualityGetFinding.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.CodeQualityGetFinding.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Response if the user is not authorized to access Code quality for this repository. + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Components.Responses.CodeQualityForbiddenRead) + /// 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.CodeQualityForbiddenRead { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)/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//repos/{owner}/{repo}/code-quality/findings/{finding_number}/get(code-quality/get-finding)/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 + ] + } + } + } /// Get a code quality setup configuration /// /// Gets a code quality setup configuration. diff --git a/Sources/code-scanning/Client.swift b/Sources/code-scanning/Client.swift index 87496b0b3b..a180d0efdc 100644 --- a/Sources/code-scanning/Client.swift +++ b/Sources/code-scanning/Client.swift @@ -932,7 +932,7 @@ public struct Client: APIProtocol { } /// Create an autofix for a code scanning alert /// - /// Creates an autofix for a code scanning alert. + /// Creates an autofix for a code scanning alert from the repository's default branch. /// /// If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response. /// diff --git a/Sources/code-scanning/Types.swift b/Sources/code-scanning/Types.swift index a3da4e8a0f..411542c8d5 100644 --- a/Sources/code-scanning/Types.swift +++ b/Sources/code-scanning/Types.swift @@ -63,7 +63,7 @@ public protocol APIProtocol: Sendable { func codeScanningGetAutofix(_ input: Operations.CodeScanningGetAutofix.Input) async throws -> Operations.CodeScanningGetAutofix.Output /// Create an autofix for a code scanning alert /// - /// Creates an autofix for a code scanning alert. + /// Creates an autofix for a code scanning alert from the repository's default branch. /// /// If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response. /// @@ -441,7 +441,7 @@ extension APIProtocol { } /// Create an autofix for a code scanning alert /// - /// Creates an autofix for a code scanning alert. + /// Creates an autofix for a code scanning alert from the repository's default branch. /// /// If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response. /// @@ -5602,7 +5602,7 @@ public enum Operations { } /// Create an autofix for a code scanning alert /// - /// Creates an autofix for a code scanning alert. + /// Creates an autofix for a code scanning alert from the repository's default branch. /// /// If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response. /// diff --git a/Sources/copilot/Types.swift b/Sources/copilot/Types.swift index 2643fbcc7e..b0897e8bac 100644 --- a/Sources/copilot/Types.swift +++ b/Sources/copilot/Types.swift @@ -3190,6 +3190,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -3217,6 +3233,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -3235,6 +3252,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -3253,6 +3271,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -3272,6 +3291,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/interactions/Client.swift b/Sources/interactions/Client.swift index cf7ab4e32a..3df890fa33 100644 --- a/Sources/interactions/Client.swift +++ b/Sources/interactions/Client.swift @@ -540,7 +540,7 @@ public struct Client: APIProtocol { /// Users on this list can create pull requests regardless of any configured /// pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can add a maximum of 100 users per request. /// The bypass list can only hold a maximum of 100 users. /// @@ -665,7 +665,7 @@ public struct Client: APIProtocol { /// Removes users from the pull request creation cap bypass list for a repository. /// Removed users will be subject to any configured pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can remove a maximum of 100 users per request. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list`. diff --git a/Sources/interactions/Types.swift b/Sources/interactions/Types.swift index 809d791bb6..17447f125d 100644 --- a/Sources/interactions/Types.swift +++ b/Sources/interactions/Types.swift @@ -70,7 +70,7 @@ public protocol APIProtocol: Sendable { /// Users on this list can create pull requests regardless of any configured /// pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can add a maximum of 100 users per request. /// The bypass list can only hold a maximum of 100 users. /// @@ -82,7 +82,7 @@ public protocol APIProtocol: Sendable { /// Removes users from the pull request creation cap bypass list for a repository. /// Removed users will be subject to any configured pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can remove a maximum of 100 users per request. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list`. @@ -220,7 +220,7 @@ extension APIProtocol { /// Users on this list can create pull requests regardless of any configured /// pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can add a maximum of 100 users per request. /// The bypass list can only hold a maximum of 100 users. /// @@ -242,7 +242,7 @@ extension APIProtocol { /// Removes users from the pull request creation cap bypass list for a repository. /// Removed users will be subject to any configured pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can remove a maximum of 100 users per request. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list`. @@ -1944,7 +1944,7 @@ public enum Operations { /// Users on this list can create pull requests regardless of any configured /// pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can add a maximum of 100 users per request. /// The bypass list can only hold a maximum of 100 users. /// @@ -2152,7 +2152,7 @@ public enum Operations { /// Removes users from the pull request creation cap bypass list for a repository. /// Removed users will be subject to any configured pull request creation cap. /// - /// Only repository admins can modify the bypass list. + /// Only users with maintainer permissions can modify the bypass list. /// You can remove a maximum of 100 users per request. /// /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/interaction-limits/pulls/bypass-list`. diff --git a/Sources/issues/Client.swift b/Sources/issues/Client.swift index 780f1fe84d..7c06f7ccb3 100644 --- a/Sources/issues/Client.swift +++ b/Sources/issues/Client.swift @@ -2264,7 +2264,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.Issue.self, + Operations.IssuesUpdate.Output.Ok.Body.JsonPayload.self, from: responseBody, transforming: { value in .json(value) diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index d5f51ffa40..9219d2d5cc 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -3484,6 +3484,385 @@ public enum Components { case codeSearchIndexStatus = "code_search_index_status" } } + /// A GitHub repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository`. + public struct SimpleRepository: Codable, Hashable, Sendable { + /// A unique identifier of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/id`. + public var id: Swift.Int64 + /// The GraphQL identifier of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/node_id`. + public var nodeId: Swift.String + /// The name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/name`. + public var name: Swift.String + /// The full, globally unique, name of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/full_name`. + public var fullName: Swift.String + /// - Remark: Generated from `#/components/schemas/simple-repository/owner`. + public var owner: Components.Schemas.SimpleUser + /// Whether the repository is private. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/private`. + public var _private: Swift.Bool + /// The URL to view the repository on GitHub.com. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/html_url`. + public var htmlUrl: Swift.String + /// The repository description. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/description`. + public var description: Swift.String? + /// Whether the repository is a fork. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/fork`. + public var fork: Swift.Bool + /// The URL to get more information about the repository from the GitHub API. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/url`. + public var url: Swift.String + /// A template for the API URL to download the repository as an archive. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/archive_url`. + public var archiveUrl: Swift.String + /// A template for the API URL to list the available assignees for issues in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/assignees_url`. + public var assigneesUrl: Swift.String + /// A template for the API URL to create or retrieve a raw Git blob in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/blobs_url`. + public var blobsUrl: Swift.String + /// A template for the API URL to get information about branches in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/branches_url`. + public var branchesUrl: Swift.String + /// A template for the API URL to get information about collaborators of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/collaborators_url`. + public var collaboratorsUrl: Swift.String + /// A template for the API URL to get information about comments on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/comments_url`. + public var commentsUrl: Swift.String + /// A template for the API URL to get information about commits on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/commits_url`. + public var commitsUrl: Swift.String + /// A template for the API URL to compare two commits or refs. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/compare_url`. + public var compareUrl: Swift.String + /// A template for the API URL to get the contents of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/contents_url`. + public var contentsUrl: Swift.String + /// A template for the API URL to list the contributors to the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/contributors_url`. + public var contributorsUrl: Swift.String + /// The API URL to list the deployments of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/deployments_url`. + public var deploymentsUrl: Swift.String + /// The API URL to list the downloads on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/downloads_url`. + public var downloadsUrl: Swift.String + /// The API URL to list the events of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/events_url`. + public var eventsUrl: Swift.String + /// The API URL to list the forks of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/forks_url`. + public var forksUrl: Swift.String + /// A template for the API URL to get information about Git commits of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_commits_url`. + public var gitCommitsUrl: Swift.String + /// A template for the API URL to get information about Git refs of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_refs_url`. + public var gitRefsUrl: Swift.String + /// A template for the API URL to get information about Git tags of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/git_tags_url`. + public var gitTagsUrl: Swift.String + /// A template for the API URL to get information about issue comments on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issue_comment_url`. + public var issueCommentUrl: Swift.String + /// A template for the API URL to get information about issue events on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issue_events_url`. + public var issueEventsUrl: Swift.String + /// A template for the API URL to get information about issues on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/issues_url`. + public var issuesUrl: Swift.String + /// A template for the API URL to get information about deploy keys on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/keys_url`. + public var keysUrl: Swift.String + /// A template for the API URL to get information about labels of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/labels_url`. + public var labelsUrl: Swift.String + /// The API URL to get information about the languages of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/languages_url`. + public var languagesUrl: Swift.String + /// The API URL to merge branches in the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/merges_url`. + public var mergesUrl: Swift.String + /// A template for the API URL to get information about milestones of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/milestones_url`. + public var milestonesUrl: Swift.String + /// A template for the API URL to get information about notifications on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/notifications_url`. + public var notificationsUrl: Swift.String + /// A template for the API URL to get information about pull requests on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/pulls_url`. + public var pullsUrl: Swift.String + /// A template for the API URL to get information about releases on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/releases_url`. + public var releasesUrl: Swift.String + /// The API URL to list the stargazers on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/stargazers_url`. + public var stargazersUrl: Swift.String + /// A template for the API URL to get information about statuses of a commit. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/statuses_url`. + public var statusesUrl: Swift.String + /// The API URL to list the subscribers on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/subscribers_url`. + public var subscribersUrl: Swift.String + /// The API URL to subscribe to notifications for this repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/subscription_url`. + public var subscriptionUrl: Swift.String + /// The API URL to get information about tags on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/tags_url`. + public var tagsUrl: Swift.String + /// The API URL to list the teams on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/teams_url`. + public var teamsUrl: Swift.String + /// A template for the API URL to create or retrieve a raw Git tree of the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/trees_url`. + public var treesUrl: Swift.String + /// The API URL to list the hooks on the repository. + /// + /// - Remark: Generated from `#/components/schemas/simple-repository/hooks_url`. + public var hooksUrl: Swift.String + /// Creates a new `SimpleRepository`. + /// + /// - Parameters: + /// - id: A unique identifier of the repository. + /// - nodeId: The GraphQL identifier of the repository. + /// - name: The name of the repository. + /// - fullName: The full, globally unique, name of the repository. + /// - owner: + /// - _private: Whether the repository is private. + /// - htmlUrl: The URL to view the repository on GitHub.com. + /// - description: The repository description. + /// - fork: Whether the repository is a fork. + /// - url: The URL to get more information about the repository from the GitHub API. + /// - archiveUrl: A template for the API URL to download the repository as an archive. + /// - assigneesUrl: A template for the API URL to list the available assignees for issues in the repository. + /// - blobsUrl: A template for the API URL to create or retrieve a raw Git blob in the repository. + /// - branchesUrl: A template for the API URL to get information about branches in the repository. + /// - collaboratorsUrl: A template for the API URL to get information about collaborators of the repository. + /// - commentsUrl: A template for the API URL to get information about comments on the repository. + /// - commitsUrl: A template for the API URL to get information about commits on the repository. + /// - compareUrl: A template for the API URL to compare two commits or refs. + /// - contentsUrl: A template for the API URL to get the contents of the repository. + /// - contributorsUrl: A template for the API URL to list the contributors to the repository. + /// - deploymentsUrl: The API URL to list the deployments of the repository. + /// - downloadsUrl: The API URL to list the downloads on the repository. + /// - eventsUrl: The API URL to list the events of the repository. + /// - forksUrl: The API URL to list the forks of the repository. + /// - gitCommitsUrl: A template for the API URL to get information about Git commits of the repository. + /// - gitRefsUrl: A template for the API URL to get information about Git refs of the repository. + /// - gitTagsUrl: A template for the API URL to get information about Git tags of the repository. + /// - issueCommentUrl: A template for the API URL to get information about issue comments on the repository. + /// - issueEventsUrl: A template for the API URL to get information about issue events on the repository. + /// - issuesUrl: A template for the API URL to get information about issues on the repository. + /// - keysUrl: A template for the API URL to get information about deploy keys on the repository. + /// - labelsUrl: A template for the API URL to get information about labels of the repository. + /// - languagesUrl: The API URL to get information about the languages of the repository. + /// - mergesUrl: The API URL to merge branches in the repository. + /// - milestonesUrl: A template for the API URL to get information about milestones of the repository. + /// - notificationsUrl: A template for the API URL to get information about notifications on the repository. + /// - pullsUrl: A template for the API URL to get information about pull requests on the repository. + /// - releasesUrl: A template for the API URL to get information about releases on the repository. + /// - stargazersUrl: The API URL to list the stargazers on the repository. + /// - statusesUrl: A template for the API URL to get information about statuses of a commit. + /// - subscribersUrl: The API URL to list the subscribers on the repository. + /// - subscriptionUrl: The API URL to subscribe to notifications for this repository. + /// - tagsUrl: The API URL to get information about tags on the repository. + /// - teamsUrl: The API URL to list the teams on the repository. + /// - treesUrl: A template for the API URL to create or retrieve a raw Git tree of the repository. + /// - hooksUrl: The API URL to list the hooks on the repository. + public init( + id: Swift.Int64, + nodeId: Swift.String, + name: Swift.String, + fullName: Swift.String, + owner: Components.Schemas.SimpleUser, + _private: Swift.Bool, + htmlUrl: Swift.String, + description: Swift.String? = nil, + fork: Swift.Bool, + url: Swift.String, + archiveUrl: Swift.String, + assigneesUrl: Swift.String, + blobsUrl: Swift.String, + branchesUrl: Swift.String, + collaboratorsUrl: Swift.String, + commentsUrl: Swift.String, + commitsUrl: Swift.String, + compareUrl: Swift.String, + contentsUrl: Swift.String, + contributorsUrl: Swift.String, + deploymentsUrl: Swift.String, + downloadsUrl: Swift.String, + eventsUrl: Swift.String, + forksUrl: Swift.String, + gitCommitsUrl: Swift.String, + gitRefsUrl: Swift.String, + gitTagsUrl: Swift.String, + issueCommentUrl: Swift.String, + issueEventsUrl: Swift.String, + issuesUrl: Swift.String, + keysUrl: Swift.String, + labelsUrl: Swift.String, + languagesUrl: Swift.String, + mergesUrl: Swift.String, + milestonesUrl: Swift.String, + notificationsUrl: Swift.String, + pullsUrl: Swift.String, + releasesUrl: Swift.String, + stargazersUrl: Swift.String, + statusesUrl: Swift.String, + subscribersUrl: Swift.String, + subscriptionUrl: Swift.String, + tagsUrl: Swift.String, + teamsUrl: Swift.String, + treesUrl: Swift.String, + hooksUrl: Swift.String + ) { + self.id = id + self.nodeId = nodeId + self.name = name + self.fullName = fullName + self.owner = owner + self._private = _private + self.htmlUrl = htmlUrl + self.description = description + self.fork = fork + self.url = url + self.archiveUrl = archiveUrl + self.assigneesUrl = assigneesUrl + self.blobsUrl = blobsUrl + self.branchesUrl = branchesUrl + self.collaboratorsUrl = collaboratorsUrl + self.commentsUrl = commentsUrl + self.commitsUrl = commitsUrl + self.compareUrl = compareUrl + self.contentsUrl = contentsUrl + self.contributorsUrl = contributorsUrl + self.deploymentsUrl = deploymentsUrl + self.downloadsUrl = downloadsUrl + self.eventsUrl = eventsUrl + self.forksUrl = forksUrl + self.gitCommitsUrl = gitCommitsUrl + self.gitRefsUrl = gitRefsUrl + self.gitTagsUrl = gitTagsUrl + self.issueCommentUrl = issueCommentUrl + self.issueEventsUrl = issueEventsUrl + self.issuesUrl = issuesUrl + self.keysUrl = keysUrl + self.labelsUrl = labelsUrl + self.languagesUrl = languagesUrl + self.mergesUrl = mergesUrl + self.milestonesUrl = milestonesUrl + self.notificationsUrl = notificationsUrl + self.pullsUrl = pullsUrl + self.releasesUrl = releasesUrl + self.stargazersUrl = stargazersUrl + self.statusesUrl = statusesUrl + self.subscribersUrl = subscribersUrl + self.subscriptionUrl = subscriptionUrl + self.tagsUrl = tagsUrl + self.teamsUrl = teamsUrl + self.treesUrl = treesUrl + self.hooksUrl = hooksUrl + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case name + case fullName = "full_name" + case owner + case _private = "private" + case htmlUrl = "html_url" + case description + case fork + case url + case archiveUrl = "archive_url" + case assigneesUrl = "assignees_url" + case blobsUrl = "blobs_url" + case branchesUrl = "branches_url" + case collaboratorsUrl = "collaborators_url" + case commentsUrl = "comments_url" + case commitsUrl = "commits_url" + case compareUrl = "compare_url" + case contentsUrl = "contents_url" + case contributorsUrl = "contributors_url" + case deploymentsUrl = "deployments_url" + case downloadsUrl = "downloads_url" + case eventsUrl = "events_url" + case forksUrl = "forks_url" + case gitCommitsUrl = "git_commits_url" + case gitRefsUrl = "git_refs_url" + case gitTagsUrl = "git_tags_url" + case issueCommentUrl = "issue_comment_url" + case issueEventsUrl = "issue_events_url" + case issuesUrl = "issues_url" + case keysUrl = "keys_url" + case labelsUrl = "labels_url" + case languagesUrl = "languages_url" + case mergesUrl = "merges_url" + case milestonesUrl = "milestones_url" + case notificationsUrl = "notifications_url" + case pullsUrl = "pulls_url" + case releasesUrl = "releases_url" + case stargazersUrl = "stargazers_url" + case statusesUrl = "statuses_url" + case subscribersUrl = "subscribers_url" + case subscriptionUrl = "subscription_url" + case tagsUrl = "tags_url" + case teamsUrl = "teams_url" + case treesUrl = "trees_url" + case hooksUrl = "hooks_url" + } + } /// Color-coded labels help you categorize and filter your issues (just like labels in Gmail). /// /// - Remark: Generated from `#/components/schemas/label`. @@ -4147,6 +4526,25 @@ public enum Components { case pinnedBy = "pinned_by" } } + /// Details about why an issue comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized`. + public struct NullableIssueCommentMinimized: Codable, Hashable, Sendable { + /// The reason the comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized/reason`. + public var reason: Swift.String? + /// Creates a new `NullableIssueCommentMinimized`. + /// + /// - Parameters: + /// - reason: The reason the comment was minimized. + public init(reason: Swift.String? = nil) { + self.reason = reason + } + public enum CodingKeys: String, CodingKey { + case reason + } + } /// Comments provide a way for people to collaborate on an issue. /// /// - Remark: Generated from `#/components/schemas/nullable-issue-comment`. @@ -4187,6 +4585,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `NullableIssueComment`. /// /// - Parameters: @@ -4205,6 +4605,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( id: Swift.Int64, nodeId: Swift.String, @@ -4220,7 +4621,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.id = id self.nodeId = nodeId @@ -4237,6 +4639,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case id @@ -4254,6 +4657,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary`. @@ -4299,6 +4703,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`. public var issueFieldId: Swift.Int64 + /// The human-readable name of the issue field. + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_name`. + public var issueFieldName: Swift.String? /// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`. public var nodeId: Swift.String /// The data type of the issue field @@ -4468,6 +4876,7 @@ public enum Components { /// /// - Parameters: /// - issueFieldId: Unique identifier for the issue field. + /// - issueFieldName: The human-readable name of the issue field. /// - nodeId: /// - dataType: The data type of the issue field /// - value: The value of the issue field @@ -4475,6 +4884,7 @@ public enum Components { /// - multiSelectOptions: Details about the selected options public init( issueFieldId: Swift.Int64, + issueFieldName: Swift.String? = nil, nodeId: Swift.String, dataType: Components.Schemas.IssueFieldValue.DataTypePayload, value: Components.Schemas.IssueFieldValue.ValuePayload? = nil, @@ -4482,6 +4892,7 @@ public enum Components { multiSelectOptions: Components.Schemas.IssueFieldValue.MultiSelectOptionsPayload? = nil ) { self.issueFieldId = issueFieldId + self.issueFieldName = issueFieldName self.nodeId = nodeId self.dataType = dataType self.value = value @@ -4490,6 +4901,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case issueFieldId = "issue_field_id" + case issueFieldName = "issue_field_name" case nodeId = "node_id" case dataType = "data_type" case value @@ -4948,6 +5360,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/issue-comment/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/issue-comment/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `IssueComment`. /// /// - Parameters: @@ -4966,6 +5380,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( id: Swift.Int64, nodeId: Swift.String, @@ -4981,7 +5396,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.id = id self.nodeId = nodeId @@ -4998,6 +5414,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case id @@ -5015,6 +5432,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// Groups of organization members that gives permissions on specified repositories. @@ -5237,6 +5655,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -5264,6 +5698,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -5282,6 +5717,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -5300,6 +5736,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -5319,6 +5756,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent @@ -5983,9 +6421,163 @@ public enum Components { case to } } - /// Issue Event + /// The type of issue. /// - /// - Remark: Generated from `#/components/schemas/issue-event`. + /// - Remark: Generated from `#/components/schemas/issue-type-webhook`. + public struct IssueTypeWebhook: Codable, Hashable, Sendable { + /// The unique identifier of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type-webhook/id`. + public var id: Swift.Int + /// The name of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type-webhook/name`. + public var name: Swift.String + /// The color of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-type-webhook/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-webhook/color`. + public var color: Components.Schemas.IssueTypeWebhook.ColorPayload? + /// Creates a new `IssueTypeWebhook`. + /// + /// - Parameters: + /// - id: The unique identifier of the issue type. + /// - name: The name of the issue type. + /// - color: The color of the issue type. + public init( + id: Swift.Int, + name: Swift.String, + color: Components.Schemas.IssueTypeWebhook.ColorPayload? = nil + ) { + self.id = id + self.name = name + self.color = color + } + public enum CodingKeys: String, CodingKey { + case id + case name + case color + } + } + /// A minimal reference to an issue linked from a timeline event (e.g. sub-issue, parent-issue, or dependency events). + /// + /// - Remark: Generated from `#/components/schemas/issue-reference`. + public struct IssueReference: Codable, Hashable, Sendable { + /// The number of the referenced issue. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/number`. + public var number: Swift.Int + /// The title of the referenced issue. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/title`. + public var title: Swift.String + /// The state of the referenced issue. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/state`. + public var state: Swift.String + /// The reason for the referenced issue's state. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/state_reason`. + public var stateReason: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-reference/repository`. + public var repository: Components.Schemas.SimpleRepository + /// The type of the referenced issue. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/issue_type`. + public struct IssueTypePayload: Codable, Hashable, Sendable { + /// The unique identifier of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/issue_type/id`. + public var id: Swift.Int + /// The node identifier of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/issue_type/node_id`. + public var nodeId: Swift.String + /// The name of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/issue_type/name`. + public var name: Swift.String + /// The color of the issue type. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/issue_type/color`. + public var color: Swift.String? + /// Creates a new `IssueTypePayload`. + /// + /// - Parameters: + /// - id: The unique identifier of the issue type. + /// - nodeId: The node identifier of the issue type. + /// - name: The name of the issue type. + /// - color: The color of the issue type. + public init( + id: Swift.Int, + nodeId: Swift.String, + name: Swift.String, + color: Swift.String? = nil + ) { + self.id = id + self.nodeId = nodeId + self.name = name + self.color = color + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case name + case color + } + } + /// The type of the referenced issue. + /// + /// - Remark: Generated from `#/components/schemas/issue-reference/issue_type`. + public var issueType: Components.Schemas.IssueReference.IssueTypePayload? + /// Creates a new `IssueReference`. + /// + /// - Parameters: + /// - number: The number of the referenced issue. + /// - title: The title of the referenced issue. + /// - state: The state of the referenced issue. + /// - stateReason: The reason for the referenced issue's state. + /// - repository: + /// - issueType: The type of the referenced issue. + public init( + number: Swift.Int, + title: Swift.String, + state: Swift.String, + stateReason: Swift.String? = nil, + repository: Components.Schemas.SimpleRepository, + issueType: Components.Schemas.IssueReference.IssueTypePayload? = nil + ) { + self.number = number + self.title = title + self.state = state + self.stateReason = stateReason + self.repository = repository + self.issueType = issueType + } + public enum CodingKeys: String, CodingKey { + case number + case title + case state + case stateReason = "state_reason" + case repository + case issueType = "issue_type" + } + } + /// Issue Event + /// + /// - Remark: Generated from `#/components/schemas/issue-event`. public struct IssueEvent: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/issue-event/id`. public var id: Swift.Int64 @@ -6025,6 +6617,14 @@ public enum Components { public var projectCard: Components.Schemas.IssueEventProjectCard? /// - Remark: Generated from `#/components/schemas/issue-event/rename`. public var rename: Components.Schemas.IssueEventRename? + /// - Remark: Generated from `#/components/schemas/issue-event/issue_type`. + public var issueType: Components.Schemas.IssueTypeWebhook? + /// - Remark: Generated from `#/components/schemas/issue-event/prev_issue_type`. + public var prevIssueType: Components.Schemas.IssueTypeWebhook? + /// - Remark: Generated from `#/components/schemas/issue-event/sub_issue`. + public var subIssue: Components.Schemas.IssueReference? + /// - Remark: Generated from `#/components/schemas/issue-event/parent_issue`. + public var parentIssue: Components.Schemas.IssueReference? /// - Remark: Generated from `#/components/schemas/issue-event/author_association`. public var authorAssociation: Components.Schemas.AuthorAssociation? /// - Remark: Generated from `#/components/schemas/issue-event/lock_reason`. @@ -6053,6 +6653,10 @@ public enum Components { /// - milestone: /// - projectCard: /// - rename: + /// - issueType: + /// - prevIssueType: + /// - subIssue: + /// - parentIssue: /// - authorAssociation: /// - lockReason: /// - performedViaGithubApp: @@ -6076,6 +6680,10 @@ public enum Components { milestone: Components.Schemas.IssueEventMilestone? = nil, projectCard: Components.Schemas.IssueEventProjectCard? = nil, rename: Components.Schemas.IssueEventRename? = nil, + issueType: Components.Schemas.IssueTypeWebhook? = nil, + prevIssueType: Components.Schemas.IssueTypeWebhook? = nil, + subIssue: Components.Schemas.IssueReference? = nil, + parentIssue: Components.Schemas.IssueReference? = nil, authorAssociation: Components.Schemas.AuthorAssociation? = nil, lockReason: Swift.String? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil @@ -6099,6 +6707,10 @@ public enum Components { self.milestone = milestone self.projectCard = projectCard self.rename = rename + self.issueType = issueType + self.prevIssueType = prevIssueType + self.subIssue = subIssue + self.parentIssue = parentIssue self.authorAssociation = authorAssociation self.lockReason = lockReason self.performedViaGithubApp = performedViaGithubApp @@ -6123,6 +6735,10 @@ public enum Components { case milestone case projectCard = "project_card" case rename + case issueType = "issue_type" + case prevIssueType = "prev_issue_type" + case subIssue = "sub_issue" + case parentIssue = "parent_issue" case authorAssociation = "author_association" case lockReason = "lock_reason" case performedViaGithubApp = "performed_via_github_app" @@ -7410,9 +8026,573 @@ public enum Components { case previousColumnName = "previous_column_name" } } - /// - Remark: Generated from `#/components/schemas/removed-from-project-issue-event/project_card`. - public var projectCard: Components.Schemas.RemovedFromProjectIssueEvent.ProjectCardPayload? - /// Creates a new `RemovedFromProjectIssueEvent`. + /// - Remark: Generated from `#/components/schemas/removed-from-project-issue-event/project_card`. + public var projectCard: Components.Schemas.RemovedFromProjectIssueEvent.ProjectCardPayload? + /// Creates a new `RemovedFromProjectIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - projectCard: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + projectCard: Components.Schemas.RemovedFromProjectIssueEvent.ProjectCardPayload? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.projectCard = projectCard + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case projectCard = "project_card" + } + } + /// Converted Note to Issue Issue Event + /// + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event`. + public struct ConvertedNoteToIssueIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.Integration? + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card`. + public struct ProjectCardPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/project_id`. + public var projectId: Swift.Int + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/project_url`. + public var projectUrl: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/column_name`. + public var columnName: Swift.String + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/previous_column_name`. + public var previousColumnName: Swift.String? + /// Creates a new `ProjectCardPayload`. + /// + /// - Parameters: + /// - id: + /// - url: + /// - projectId: + /// - projectUrl: + /// - columnName: + /// - previousColumnName: + public init( + id: Swift.Int, + url: Swift.String, + projectId: Swift.Int, + projectUrl: Swift.String, + columnName: Swift.String, + previousColumnName: Swift.String? = nil + ) { + self.id = id + self.url = url + self.projectId = projectId + self.projectUrl = projectUrl + self.columnName = columnName + self.previousColumnName = previousColumnName + } + public enum CodingKeys: String, CodingKey { + case id + case url + case projectId = "project_id" + case projectUrl = "project_url" + case columnName = "column_name" + case previousColumnName = "previous_column_name" + } + } + /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card`. + public var projectCard: Components.Schemas.ConvertedNoteToIssueIssueEvent.ProjectCardPayload? + /// Creates a new `ConvertedNoteToIssueIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - projectCard: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.Integration? = nil, + projectCard: Components.Schemas.ConvertedNoteToIssueIssueEvent.ProjectCardPayload? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.projectCard = projectCard + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case projectCard = "project_card" + } + } + /// Issue Type Added Issue Event + /// + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event`. + public struct IssueTypeAddedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/issue-type-added-issue-event/issue_type`. + public var issueType: Components.Schemas.IssueTypeWebhook? + /// Creates a new `IssueTypeAddedIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - issueType: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + issueType: Components.Schemas.IssueTypeWebhook? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.issueType = issueType + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case issueType = "issue_type" + } + } + /// Issue Type Removed Issue Event + /// + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event`. + public struct IssueTypeRemovedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/issue-type-removed-issue-event/prev_issue_type`. + public var prevIssueType: Components.Schemas.IssueTypeWebhook? + /// Creates a new `IssueTypeRemovedIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - prevIssueType: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + prevIssueType: Components.Schemas.IssueTypeWebhook? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.prevIssueType = prevIssueType + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case prevIssueType = "prev_issue_type" + } + } + /// Issue Type Changed Issue Event + /// + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event`. + public struct IssueTypeChangedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/issue_type`. + public var issueType: Components.Schemas.IssueTypeWebhook? + /// - Remark: Generated from `#/components/schemas/issue-type-changed-issue-event/prev_issue_type`. + public var prevIssueType: Components.Schemas.IssueTypeWebhook? + /// Creates a new `IssueTypeChangedIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - issueType: + /// - prevIssueType: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + issueType: Components.Schemas.IssueTypeWebhook? = nil, + prevIssueType: Components.Schemas.IssueTypeWebhook? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.issueType = issueType + self.prevIssueType = prevIssueType + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case issueType = "issue_type" + case prevIssueType = "prev_issue_type" + } + } + /// Sub-issue Added Issue Event + /// + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event`. + public struct SubIssueAddedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/sub-issue-added-issue-event/sub_issue`. + public var subIssue: Components.Schemas.IssueReference? + /// Creates a new `SubIssueAddedIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - subIssue: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + subIssue: Components.Schemas.IssueReference? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.subIssue = subIssue + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case subIssue = "sub_issue" + } + } + /// Sub-issue Removed Issue Event + /// + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event`. + public struct SubIssueRemovedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/sub-issue-removed-issue-event/sub_issue`. + public var subIssue: Components.Schemas.IssueReference? + /// Creates a new `SubIssueRemovedIssueEvent`. + /// + /// - Parameters: + /// - id: + /// - nodeId: + /// - url: + /// - actor: + /// - event: + /// - commitId: + /// - commitUrl: + /// - createdAt: + /// - performedViaGithubApp: + /// - subIssue: + public init( + id: Swift.Int, + nodeId: Swift.String, + url: Swift.String, + actor: Components.Schemas.SimpleUser, + event: Swift.String, + commitId: Swift.String? = nil, + commitUrl: Swift.String? = nil, + createdAt: Swift.String, + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + subIssue: Components.Schemas.IssueReference? = nil + ) { + self.id = id + self.nodeId = nodeId + self.url = url + self.actor = actor + self.event = event + self.commitId = commitId + self.commitUrl = commitUrl + self.createdAt = createdAt + self.performedViaGithubApp = performedViaGithubApp + self.subIssue = subIssue + } + public enum CodingKeys: String, CodingKey { + case id + case nodeId = "node_id" + case url + case actor + case event + case commitId = "commit_id" + case commitUrl = "commit_url" + case createdAt = "created_at" + case performedViaGithubApp = "performed_via_github_app" + case subIssue = "sub_issue" + } + } + /// Parent-issue Added Issue Event + /// + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event`. + public struct ParentIssueAddedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/id`. + public var id: Swift.Int + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/node_id`. + public var nodeId: Swift.String + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/url`. + public var url: Swift.String + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/actor`. + public var actor: Components.Schemas.SimpleUser + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/event`. + public var event: Swift.String + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/commit_id`. + public var commitId: Swift.String? + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/commit_url`. + public var commitUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/created_at`. + public var createdAt: Swift.String + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/parent-issue-added-issue-event/parent_issue`. + public var parentIssue: Components.Schemas.IssueReference? + /// Creates a new `ParentIssueAddedIssueEvent`. /// /// - Parameters: /// - id: @@ -7424,7 +8604,7 @@ public enum Components { /// - commitUrl: /// - createdAt: /// - performedViaGithubApp: - /// - projectCard: + /// - parentIssue: public init( id: Swift.Int, nodeId: Swift.String, @@ -7435,7 +8615,7 @@ public enum Components { commitUrl: Swift.String? = nil, createdAt: Swift.String, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, - projectCard: Components.Schemas.RemovedFromProjectIssueEvent.ProjectCardPayload? = nil + parentIssue: Components.Schemas.IssueReference? = nil ) { self.id = id self.nodeId = nodeId @@ -7446,7 +8626,7 @@ public enum Components { self.commitUrl = commitUrl self.createdAt = createdAt self.performedViaGithubApp = performedViaGithubApp - self.projectCard = projectCard + self.parentIssue = parentIssue } public enum CodingKeys: String, CodingKey { case id @@ -7458,81 +8638,34 @@ public enum Components { case commitUrl = "commit_url" case createdAt = "created_at" case performedViaGithubApp = "performed_via_github_app" - case projectCard = "project_card" + case parentIssue = "parent_issue" } } - /// Converted Note to Issue Issue Event + /// Parent-issue Removed Issue Event /// - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event`. - public struct ConvertedNoteToIssueIssueEvent: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/id`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event`. + public struct ParentIssueRemovedIssueEvent: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/id`. public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/node_id`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/node_id`. public var nodeId: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/url`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/url`. public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/actor`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/actor`. public var actor: Components.Schemas.SimpleUser - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/event`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/event`. public var event: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/commit_id`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/commit_id`. public var commitId: Swift.String? - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/commit_url`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/commit_url`. public var commitUrl: Swift.String? - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/created_at`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/created_at`. public var createdAt: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/performed_via_github_app`. - public var performedViaGithubApp: Components.Schemas.Integration? - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card`. - public struct ProjectCardPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/id`. - public var id: Swift.Int - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/url`. - public var url: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/project_id`. - public var projectId: Swift.Int - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/project_url`. - public var projectUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/column_name`. - public var columnName: Swift.String - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card/previous_column_name`. - public var previousColumnName: Swift.String? - /// Creates a new `ProjectCardPayload`. - /// - /// - Parameters: - /// - id: - /// - url: - /// - projectId: - /// - projectUrl: - /// - columnName: - /// - previousColumnName: - public init( - id: Swift.Int, - url: Swift.String, - projectId: Swift.Int, - projectUrl: Swift.String, - columnName: Swift.String, - previousColumnName: Swift.String? = nil - ) { - self.id = id - self.url = url - self.projectId = projectId - self.projectUrl = projectUrl - self.columnName = columnName - self.previousColumnName = previousColumnName - } - public enum CodingKeys: String, CodingKey { - case id - case url - case projectId = "project_id" - case projectUrl = "project_url" - case columnName = "column_name" - case previousColumnName = "previous_column_name" - } - } - /// - Remark: Generated from `#/components/schemas/converted-note-to-issue-issue-event/project_card`. - public var projectCard: Components.Schemas.ConvertedNoteToIssueIssueEvent.ProjectCardPayload? - /// Creates a new `ConvertedNoteToIssueIssueEvent`. + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/performed_via_github_app`. + public var performedViaGithubApp: Components.Schemas.NullableIntegration? + /// - Remark: Generated from `#/components/schemas/parent-issue-removed-issue-event/parent_issue`. + public var parentIssue: Components.Schemas.IssueReference? + /// Creates a new `ParentIssueRemovedIssueEvent`. /// /// - Parameters: /// - id: @@ -7544,7 +8677,7 @@ public enum Components { /// - commitUrl: /// - createdAt: /// - performedViaGithubApp: - /// - projectCard: + /// - parentIssue: public init( id: Swift.Int, nodeId: Swift.String, @@ -7554,8 +8687,8 @@ public enum Components { commitId: Swift.String? = nil, commitUrl: Swift.String? = nil, createdAt: Swift.String, - performedViaGithubApp: Components.Schemas.Integration? = nil, - projectCard: Components.Schemas.ConvertedNoteToIssueIssueEvent.ProjectCardPayload? = nil + performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, + parentIssue: Components.Schemas.IssueReference? = nil ) { self.id = id self.nodeId = nodeId @@ -7566,7 +8699,7 @@ public enum Components { self.commitUrl = commitUrl self.createdAt = createdAt self.performedViaGithubApp = performedViaGithubApp - self.projectCard = projectCard + self.parentIssue = parentIssue } public enum CodingKeys: String, CodingKey { case id @@ -7578,7 +8711,7 @@ public enum Components { case commitUrl = "commit_url" case createdAt = "created_at" case performedViaGithubApp = "performed_via_github_app" - case projectCard = "project_card" + case parentIssue = "parent_issue" } } /// Issue Event for Issue @@ -7615,6 +8748,20 @@ public enum Components { public var value14: Components.Schemas.RemovedFromProjectIssueEvent? /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value15`. public var value15: Components.Schemas.ConvertedNoteToIssueIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value16`. + public var value16: Components.Schemas.IssueTypeAddedIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value17`. + public var value17: Components.Schemas.IssueTypeRemovedIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value18`. + public var value18: Components.Schemas.IssueTypeChangedIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value19`. + public var value19: Components.Schemas.SubIssueAddedIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value20`. + public var value20: Components.Schemas.SubIssueRemovedIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value21`. + public var value21: Components.Schemas.ParentIssueAddedIssueEvent? + /// - Remark: Generated from `#/components/schemas/issue-event-for-issue/value22`. + public var value22: Components.Schemas.ParentIssueRemovedIssueEvent? /// Creates a new `IssueEventForIssue`. /// /// - Parameters: @@ -7633,6 +8780,13 @@ public enum Components { /// - value13: /// - value14: /// - value15: + /// - value16: + /// - value17: + /// - value18: + /// - value19: + /// - value20: + /// - value21: + /// - value22: public init( value1: Components.Schemas.LabeledIssueEvent? = nil, value2: Components.Schemas.UnlabeledIssueEvent? = nil, @@ -7648,7 +8802,14 @@ public enum Components { value12: Components.Schemas.AddedToProjectIssueEvent? = nil, value13: Components.Schemas.MovedColumnInProjectIssueEvent? = nil, value14: Components.Schemas.RemovedFromProjectIssueEvent? = nil, - value15: Components.Schemas.ConvertedNoteToIssueIssueEvent? = nil + value15: Components.Schemas.ConvertedNoteToIssueIssueEvent? = nil, + value16: Components.Schemas.IssueTypeAddedIssueEvent? = nil, + value17: Components.Schemas.IssueTypeRemovedIssueEvent? = nil, + value18: Components.Schemas.IssueTypeChangedIssueEvent? = nil, + value19: Components.Schemas.SubIssueAddedIssueEvent? = nil, + value20: Components.Schemas.SubIssueRemovedIssueEvent? = nil, + value21: Components.Schemas.ParentIssueAddedIssueEvent? = nil, + value22: Components.Schemas.ParentIssueRemovedIssueEvent? = nil ) { self.value1 = value1 self.value2 = value2 @@ -7665,6 +8826,13 @@ public enum Components { self.value13 = value13 self.value14 = value14 self.value15 = value15 + self.value16 = value16 + self.value17 = value17 + self.value18 = value18 + self.value19 = value19 + self.value20 = value20 + self.value21 = value21 + self.value22 = value22 } public init(from decoder: any Swift.Decoder) throws { var errors: [any Swift.Error] = [] @@ -7743,6 +8911,41 @@ public enum Components { } catch { errors.append(error) } + do { + self.value16 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value17 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value18 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value19 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value20 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value21 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value22 = try .init(from: decoder) + } catch { + errors.append(error) + } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ self.value1, @@ -7759,7 +8962,14 @@ public enum Components { self.value12, self.value13, self.value14, - self.value15 + self.value15, + self.value16, + self.value17, + self.value18, + self.value19, + self.value20, + self.value21, + self.value22 ], type: Self.self, codingPath: decoder.codingPath, @@ -7782,6 +8992,13 @@ public enum Components { try self.value13?.encode(to: encoder) try self.value14?.encode(to: encoder) try self.value15?.encode(to: encoder) + try self.value16?.encode(to: encoder) + try self.value17?.encode(to: encoder) + try self.value18?.encode(to: encoder) + try self.value19?.encode(to: encoder) + try self.value20?.encode(to: encoder) + try self.value21?.encode(to: encoder) + try self.value22?.encode(to: encoder) } } /// Timeline Comment Event @@ -7828,6 +9045,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/timeline-comment-event/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/timeline-comment-event/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `TimelineCommentEvent`. /// /// - Parameters: @@ -7848,6 +9067,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( event: Swift.String, actor: Components.Schemas.SimpleUser, @@ -7865,7 +9085,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.event = event self.actor = actor @@ -7884,6 +9105,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case event @@ -7903,6 +9125,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// Timeline Cross Referenced Event @@ -9052,6 +10275,20 @@ public enum Components { public var value21: Components.Schemas.TimelineUnassignedIssueEvent? /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value22`. public var value22: Components.Schemas.StateChangeIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value23`. + public var value23: Components.Schemas.IssueTypeAddedIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value24`. + public var value24: Components.Schemas.IssueTypeRemovedIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value25`. + public var value25: Components.Schemas.IssueTypeChangedIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value26`. + public var value26: Components.Schemas.SubIssueAddedIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value27`. + public var value27: Components.Schemas.SubIssueRemovedIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value28`. + public var value28: Components.Schemas.ParentIssueAddedIssueEvent? + /// - Remark: Generated from `#/components/schemas/timeline-issue-events/value29`. + public var value29: Components.Schemas.ParentIssueRemovedIssueEvent? /// Creates a new `TimelineIssueEvents`. /// /// - Parameters: @@ -9077,6 +10314,13 @@ public enum Components { /// - value20: /// - value21: /// - value22: + /// - value23: + /// - value24: + /// - value25: + /// - value26: + /// - value27: + /// - value28: + /// - value29: public init( value1: Components.Schemas.LabeledIssueEvent? = nil, value2: Components.Schemas.UnlabeledIssueEvent? = nil, @@ -9099,7 +10343,14 @@ public enum Components { value19: Components.Schemas.TimelineCommitCommentedEvent? = nil, value20: Components.Schemas.TimelineAssignedIssueEvent? = nil, value21: Components.Schemas.TimelineUnassignedIssueEvent? = nil, - value22: Components.Schemas.StateChangeIssueEvent? = nil + value22: Components.Schemas.StateChangeIssueEvent? = nil, + value23: Components.Schemas.IssueTypeAddedIssueEvent? = nil, + value24: Components.Schemas.IssueTypeRemovedIssueEvent? = nil, + value25: Components.Schemas.IssueTypeChangedIssueEvent? = nil, + value26: Components.Schemas.SubIssueAddedIssueEvent? = nil, + value27: Components.Schemas.SubIssueRemovedIssueEvent? = nil, + value28: Components.Schemas.ParentIssueAddedIssueEvent? = nil, + value29: Components.Schemas.ParentIssueRemovedIssueEvent? = nil ) { self.value1 = value1 self.value2 = value2 @@ -9123,6 +10374,13 @@ public enum Components { self.value20 = value20 self.value21 = value21 self.value22 = value22 + self.value23 = value23 + self.value24 = value24 + self.value25 = value25 + self.value26 = value26 + self.value27 = value27 + self.value28 = value28 + self.value29 = value29 } public init(from decoder: any Swift.Decoder) throws { var errors: [any Swift.Error] = [] @@ -9236,6 +10494,41 @@ public enum Components { } catch { errors.append(error) } + do { + self.value23 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value24 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value25 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value26 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value27 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value28 = try .init(from: decoder) + } catch { + errors.append(error) + } + do { + self.value29 = try .init(from: decoder) + } catch { + errors.append(error) + } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ self.value1, @@ -9259,7 +10552,14 @@ public enum Components { self.value19, self.value20, self.value21, - self.value22 + self.value22, + self.value23, + self.value24, + self.value25, + self.value26, + self.value27, + self.value28, + self.value29 ], type: Self.self, codingPath: decoder.codingPath, @@ -9289,6 +10589,13 @@ public enum Components { try self.value20?.encode(to: encoder) try self.value21?.encode(to: encoder) try self.value22?.encode(to: encoder) + try self.value23?.encode(to: encoder) + try self.value24?.encode(to: encoder) + try self.value25?.encode(to: encoder) + try self.value26?.encode(to: encoder) + try self.value27?.encode(to: encoder) + try self.value28?.encode(to: encoder) + try self.value29?.encode(to: encoder) } } /// A collection of related issues and pull requests. @@ -14023,10 +15330,64 @@ public enum Operations { /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/labels`. public var labels: Operations.IssuesUpdate.Input.Body.JsonPayload.LabelsPayload? + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/AssigneesPayload`. + @frozen public enum AssigneesPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/AssigneesPayload/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/AssigneesPayload/case2`. + public struct Case2Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/AssigneesPayload/case2/login`. + public var login: Swift.String? + /// Creates a new `Case2Payload`. + /// + /// - Parameters: + /// - login: + public init(login: Swift.String? = nil) { + self.login = login + } + public enum CodingKeys: String, CodingKey { + case login + } + } + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/AssigneesPayload/case2`. + case case2(Operations.IssuesUpdate.Input.Body.JsonPayload.AssigneesPayloadPayload.Case2Payload) + public init(from decoder: any Swift.Decoder) throws { + var errors: [any Swift.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 Swift.Encoder) throws { + switch self { + case let .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try value.encode(to: encoder) + } + } + } /// Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. /// /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/assignees`. - public var assignees: [Swift.String]? + public typealias AssigneesPayload = [Operations.IssuesUpdate.Input.Body.JsonPayload.AssigneesPayloadPayload] + /// Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/assignees`. + public var assignees: Operations.IssuesUpdate.Input.Body.JsonPayload.AssigneesPayload? /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/requestBody/json/IssueFieldValuesPayload`. public struct IssueFieldValuesPayloadPayload: Codable, Hashable, Sendable { /// The ID of the issue field to set @@ -14149,7 +15510,7 @@ public enum Operations { stateReason: Operations.IssuesUpdate.Input.Body.JsonPayload.StateReasonPayload? = nil, milestone: Operations.IssuesUpdate.Input.Body.JsonPayload.MilestonePayload? = nil, labels: Operations.IssuesUpdate.Input.Body.JsonPayload.LabelsPayload? = nil, - assignees: [Swift.String]? = nil, + assignees: Operations.IssuesUpdate.Input.Body.JsonPayload.AssigneesPayload? = nil, issueFieldValues: Operations.IssuesUpdate.Input.Body.JsonPayload.IssueFieldValuesPayload? = nil, _type: Swift.String? = nil ) { @@ -14201,13 +15562,40 @@ public enum Operations { public struct Ok: Sendable, Hashable { /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/responses/200/content/json/value1`. + public var value1: Components.Schemas.Issue + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/responses/200/content/json/value2`. + public var value2: OpenAPIRuntime.OpenAPIObjectContainer + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Issue, + value2: OpenAPIRuntime.OpenAPIObjectContainer + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Swift.Decoder) throws { + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) + } + public func encode(to encoder: any Swift.Encoder) throws { + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) + } + } /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/PATCH/responses/200/content/application\/json`. - case json(Components.Schemas.Issue) + case json(Operations.IssuesUpdate.Output.Ok.Body.JsonPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. - public var json: Components.Schemas.Issue { + public var json: Operations.IssuesUpdate.Output.Ok.Body.JsonPayload { get throws { switch self { case let .json(body): diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index 109e170235..9a4a4b3720 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -7207,6 +7207,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -7234,6 +7250,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -7252,6 +7269,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -7270,6 +7288,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -7289,6 +7308,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/projects/Types.swift b/Sources/projects/Types.swift index 5c279a3812..67dc351649 100644 --- a/Sources/projects/Types.swift +++ b/Sources/projects/Types.swift @@ -2628,6 +2628,25 @@ public enum Components { case pinnedBy = "pinned_by" } } + /// Details about why an issue comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized`. + public struct NullableIssueCommentMinimized: Codable, Hashable, Sendable { + /// The reason the comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized/reason`. + public var reason: Swift.String? + /// Creates a new `NullableIssueCommentMinimized`. + /// + /// - Parameters: + /// - reason: The reason the comment was minimized. + public init(reason: Swift.String? = nil) { + self.reason = reason + } + public enum CodingKeys: String, CodingKey { + case reason + } + } /// Comments provide a way for people to collaborate on an issue. /// /// - Remark: Generated from `#/components/schemas/nullable-issue-comment`. @@ -2668,6 +2687,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `NullableIssueComment`. /// /// - Parameters: @@ -2686,6 +2707,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( id: Swift.Int64, nodeId: Swift.String, @@ -2701,7 +2723,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.id = id self.nodeId = nodeId @@ -2718,6 +2741,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case id @@ -2735,6 +2759,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary`. @@ -2780,6 +2805,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`. public var issueFieldId: Swift.Int64 + /// The human-readable name of the issue field. + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_name`. + public var issueFieldName: Swift.String? /// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`. public var nodeId: Swift.String /// The data type of the issue field @@ -2949,6 +2978,7 @@ public enum Components { /// /// - Parameters: /// - issueFieldId: Unique identifier for the issue field. + /// - issueFieldName: The human-readable name of the issue field. /// - nodeId: /// - dataType: The data type of the issue field /// - value: The value of the issue field @@ -2956,6 +2986,7 @@ public enum Components { /// - multiSelectOptions: Details about the selected options public init( issueFieldId: Swift.Int64, + issueFieldName: Swift.String? = nil, nodeId: Swift.String, dataType: Components.Schemas.IssueFieldValue.DataTypePayload, value: Components.Schemas.IssueFieldValue.ValuePayload? = nil, @@ -2963,6 +2994,7 @@ public enum Components { multiSelectOptions: Components.Schemas.IssueFieldValue.MultiSelectOptionsPayload? = nil ) { self.issueFieldId = issueFieldId + self.issueFieldName = issueFieldName self.nodeId = nodeId self.dataType = dataType self.value = value @@ -2971,6 +3003,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case issueFieldId = "issue_field_id" + case issueFieldName = "issue_field_name" case nodeId = "node_id" case dataType = "data_type" case value @@ -3609,6 +3642,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -3636,6 +3685,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -3654,6 +3704,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -3672,6 +3723,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -3691,6 +3743,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/pulls/Types.swift b/Sources/pulls/Types.swift index 0b31e9f3e5..27beb0d077 100644 --- a/Sources/pulls/Types.swift +++ b/Sources/pulls/Types.swift @@ -2830,6 +2830,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -2857,6 +2873,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -2875,6 +2892,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -2893,6 +2911,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -2912,6 +2931,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 586b5fefdd..6520ff6c7a 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -10231,6 +10231,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -10258,6 +10274,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -10276,6 +10293,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -10294,6 +10312,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -10313,6 +10332,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 40d080955f..7fa39a2038 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -2363,6 +2363,25 @@ public enum Components { case pinnedBy = "pinned_by" } } + /// Details about why an issue comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized`. + public struct NullableIssueCommentMinimized: Codable, Hashable, Sendable { + /// The reason the comment was minimized. + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment-minimized/reason`. + public var reason: Swift.String? + /// Creates a new `NullableIssueCommentMinimized`. + /// + /// - Parameters: + /// - reason: The reason the comment was minimized. + public init(reason: Swift.String? = nil) { + self.reason = reason + } + public enum CodingKeys: String, CodingKey { + case reason + } + } /// Comments provide a way for people to collaborate on an issue. /// /// - Remark: Generated from `#/components/schemas/nullable-issue-comment`. @@ -2403,6 +2422,8 @@ public enum Components { public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/pin`. public var pin: Components.Schemas.NullablePinnedIssueComment? + /// - Remark: Generated from `#/components/schemas/nullable-issue-comment/minimized`. + public var minimized: Components.Schemas.NullableIssueCommentMinimized? /// Creates a new `NullableIssueComment`. /// /// - Parameters: @@ -2421,6 +2442,7 @@ public enum Components { /// - performedViaGithubApp: /// - reactions: /// - pin: + /// - minimized: public init( id: Swift.Int64, nodeId: Swift.String, @@ -2436,7 +2458,8 @@ public enum Components { authorAssociation: Components.Schemas.AuthorAssociation? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, reactions: Components.Schemas.ReactionRollup? = nil, - pin: Components.Schemas.NullablePinnedIssueComment? = nil + pin: Components.Schemas.NullablePinnedIssueComment? = nil, + minimized: Components.Schemas.NullableIssueCommentMinimized? = nil ) { self.id = id self.nodeId = nodeId @@ -2453,6 +2476,7 @@ public enum Components { self.performedViaGithubApp = performedViaGithubApp self.reactions = reactions self.pin = pin + self.minimized = minimized } public enum CodingKeys: String, CodingKey { case id @@ -2470,6 +2494,7 @@ public enum Components { case performedViaGithubApp = "performed_via_github_app" case reactions case pin + case minimized } } /// - Remark: Generated from `#/components/schemas/issue-dependencies-summary`. @@ -2515,6 +2540,10 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_id`. public var issueFieldId: Swift.Int64 + /// The human-readable name of the issue field. + /// + /// - Remark: Generated from `#/components/schemas/issue-field-value/issue_field_name`. + public var issueFieldName: Swift.String? /// - Remark: Generated from `#/components/schemas/issue-field-value/node_id`. public var nodeId: Swift.String /// The data type of the issue field @@ -2684,6 +2713,7 @@ public enum Components { /// /// - Parameters: /// - issueFieldId: Unique identifier for the issue field. + /// - issueFieldName: The human-readable name of the issue field. /// - nodeId: /// - dataType: The data type of the issue field /// - value: The value of the issue field @@ -2691,6 +2721,7 @@ public enum Components { /// - multiSelectOptions: Details about the selected options public init( issueFieldId: Swift.Int64, + issueFieldName: Swift.String? = nil, nodeId: Swift.String, dataType: Components.Schemas.IssueFieldValue.DataTypePayload, value: Components.Schemas.IssueFieldValue.ValuePayload? = nil, @@ -2698,6 +2729,7 @@ public enum Components { multiSelectOptions: Components.Schemas.IssueFieldValue.MultiSelectOptionsPayload? = nil ) { self.issueFieldId = issueFieldId + self.issueFieldName = issueFieldName self.nodeId = nodeId self.dataType = dataType self.value = value @@ -2706,6 +2738,7 @@ public enum Components { } public enum CodingKeys: String, CodingKey { case issueFieldId = "issue_field_id" + case issueFieldName = "issue_field_name" case nodeId = "node_id" case dataType = "data_type" case value diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index e324a3e933..75bee30531 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -3307,6 +3307,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -3334,6 +3350,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -3352,6 +3369,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -3370,6 +3388,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -3389,6 +3408,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Sources/teams/Types.swift b/Sources/teams/Types.swift index 535ce8f5f8..1465433eb2 100644 --- a/Sources/teams/Types.swift +++ b/Sources/teams/Types.swift @@ -2863,6 +2863,22 @@ public enum Components { /// /// - Remark: Generated from `#/components/schemas/team/type`. public var _type: Components.Schemas.Team._TypePayload + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + @frozen public enum AccessSourcePayload: String, Codable, Hashable, Sendable, CaseIterable { + case direct = "direct" + case organization = "organization" + case enterprise = "enterprise" + } + /// How the team's access to the repository was granted. This property is only + /// present when the team is returned in a repository context, such as + /// `GET /repos/{owner}/{repo}/teams`. + /// + /// - Remark: Generated from `#/components/schemas/team/access_source`. + public var accessSource: Components.Schemas.Team.AccessSourcePayload? /// Unique identifier of the organization to which this team belongs /// /// - Remark: Generated from `#/components/schemas/team/organization_id`. @@ -2890,6 +2906,7 @@ public enum Components { /// - membersUrl: /// - repositoriesUrl: /// - _type: The ownership type of the team + /// - accessSource: How the team's access to the repository was granted. This property is only /// - organizationId: Unique identifier of the organization to which this team belongs /// - enterpriseId: Unique identifier of the enterprise to which this team belongs /// - parent: @@ -2908,6 +2925,7 @@ public enum Components { membersUrl: Swift.String, repositoriesUrl: Swift.String, _type: Components.Schemas.Team._TypePayload, + accessSource: Components.Schemas.Team.AccessSourcePayload? = nil, organizationId: Swift.Int? = nil, enterpriseId: Swift.Int? = nil, parent: Components.Schemas.NullableTeamSimple? = nil @@ -2926,6 +2944,7 @@ public enum Components { self.membersUrl = membersUrl self.repositoriesUrl = repositoriesUrl self._type = _type + self.accessSource = accessSource self.organizationId = organizationId self.enterpriseId = enterpriseId self.parent = parent @@ -2945,6 +2964,7 @@ public enum Components { case membersUrl = "members_url" case repositoriesUrl = "repositories_url" case _type = "type" + case accessSource = "access_source" case organizationId = "organization_id" case enterpriseId = "enterprise_id" case parent diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 1847198856..ef4e98d7fc 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 1847198856aa730d19ac7fef6f2617ecbec8e01e +Subproject commit ef4e98d7fcad5ec4476fd73b4d536557524f3c57