diff --git a/Sources/activity/Types.swift b/Sources/activity/Types.swift index f0f027dd4c..1894e76094 100644 --- a/Sources/activity/Types.swift +++ b/Sources/activity/Types.swift @@ -3292,11 +3292,15 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/issue/performed_via_github_app`. public var performedViaGithubApp: Components.Schemas.NullableIntegration? /// - Remark: Generated from `#/components/schemas/issue/author_association`. - public var authorAssociation: Components.Schemas.AuthorAssociation + public var authorAssociation: Components.Schemas.AuthorAssociation? /// - Remark: Generated from `#/components/schemas/issue/reactions`. public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/issue/sub_issues_summary`. public var subIssuesSummary: Components.Schemas.SubIssuesSummary? + /// URL to get the parent issue of this issue, if it is a sub-issue + /// + /// - Remark: Generated from `#/components/schemas/issue/parent_issue_url`. + public var parentIssueUrl: Swift.String? /// - Remark: Generated from `#/components/schemas/issue/issue_dependencies_summary`. public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? /// - Remark: Generated from `#/components/schemas/issue/issue_field_values`. @@ -3340,6 +3344,7 @@ public enum Components { /// - authorAssociation: /// - reactions: /// - subIssuesSummary: + /// - parentIssueUrl: URL to get the parent issue of this issue, if it is a sub-issue /// - issueDependenciesSummary: /// - issueFieldValues: public init( @@ -3376,9 +3381,10 @@ public enum Components { _type: Components.Schemas.IssueType? = nil, repository: Components.Schemas.Repository? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, - authorAssociation: Components.Schemas.AuthorAssociation, + authorAssociation: Components.Schemas.AuthorAssociation? = nil, reactions: Components.Schemas.ReactionRollup? = nil, subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil, + parentIssueUrl: Swift.String? = nil, issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil, issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil ) { @@ -3418,6 +3424,7 @@ public enum Components { self.authorAssociation = authorAssociation self.reactions = reactions self.subIssuesSummary = subIssuesSummary + self.parentIssueUrl = parentIssueUrl self.issueDependenciesSummary = issueDependenciesSummary self.issueFieldValues = issueFieldValues } @@ -3458,6 +3465,7 @@ public enum Components { case authorAssociation = "author_association" case reactions case subIssuesSummary = "sub_issues_summary" + case parentIssueUrl = "parent_issue_url" case issueDependenciesSummary = "issue_dependencies_summary" case issueFieldValues = "issue_field_values" } diff --git a/Sources/issues/Client.swift b/Sources/issues/Client.swift index 2f5ad782cb..594e66de24 100644 --- a/Sources/issues/Client.swift +++ b/Sources/issues/Client.swift @@ -4450,6 +4450,145 @@ public struct Client: APIProtocol { } ) } + /// Get parent issue + /// + /// You can use the REST API to get the parent issue of a sub-issue. + /// + /// This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/parent`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)`. + public func issuesGetParent(_ input: Operations.IssuesGetParent.Input) async throws -> Operations.IssuesGetParent.Output { + try await client.send( + input: input, + forOperation: Operations.IssuesGetParent.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/repos/{}/{}/issues/{}/parent", + parameters: [ + input.path.owner, + input.path.repo, + input.path.issueNumber + ] + ) + 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.IssuesGetParent.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.Issue.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 301: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.MovedPermanently.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 .movedPermanently(.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 410: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Components.Responses.Gone.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 .gone(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// Remove sub-issue /// /// You can use the REST API to remove a sub-issue from an issue. diff --git a/Sources/issues/Types.swift b/Sources/issues/Types.swift index 9ae335f662..3062d39504 100644 --- a/Sources/issues/Types.swift +++ b/Sources/issues/Types.swift @@ -381,6 +381,20 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/lock/delete(issues/unlock)`. func issuesUnlock(_ input: Operations.IssuesUnlock.Input) async throws -> Operations.IssuesUnlock.Output + /// Get parent issue + /// + /// You can use the REST API to get the parent issue of a sub-issue. + /// + /// This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/parent`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)`. + func issuesGetParent(_ input: Operations.IssuesGetParent.Input) async throws -> Operations.IssuesGetParent.Output /// Remove sub-issue /// /// You can use the REST API to remove a sub-issue from an issue. @@ -1192,6 +1206,28 @@ extension APIProtocol { headers: headers )) } + /// Get parent issue + /// + /// You can use the REST API to get the parent issue of a sub-issue. + /// + /// This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/parent`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)`. + public func issuesGetParent( + path: Operations.IssuesGetParent.Input.Path, + headers: Operations.IssuesGetParent.Input.Headers = .init() + ) async throws -> Operations.IssuesGetParent.Output { + try await issuesGetParent(Operations.IssuesGetParent.Input( + path: path, + headers: headers + )) + } /// Remove sub-issue /// /// You can use the REST API to remove a sub-issue from an issue. @@ -4200,11 +4236,15 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/issue/performed_via_github_app`. public var performedViaGithubApp: Components.Schemas.NullableIntegration? /// - Remark: Generated from `#/components/schemas/issue/author_association`. - public var authorAssociation: Components.Schemas.AuthorAssociation + public var authorAssociation: Components.Schemas.AuthorAssociation? /// - Remark: Generated from `#/components/schemas/issue/reactions`. public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/issue/sub_issues_summary`. public var subIssuesSummary: Components.Schemas.SubIssuesSummary? + /// URL to get the parent issue of this issue, if it is a sub-issue + /// + /// - Remark: Generated from `#/components/schemas/issue/parent_issue_url`. + public var parentIssueUrl: Swift.String? /// - Remark: Generated from `#/components/schemas/issue/issue_dependencies_summary`. public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? /// - Remark: Generated from `#/components/schemas/issue/issue_field_values`. @@ -4248,6 +4288,7 @@ public enum Components { /// - authorAssociation: /// - reactions: /// - subIssuesSummary: + /// - parentIssueUrl: URL to get the parent issue of this issue, if it is a sub-issue /// - issueDependenciesSummary: /// - issueFieldValues: public init( @@ -4284,9 +4325,10 @@ public enum Components { _type: Components.Schemas.IssueType? = nil, repository: Components.Schemas.Repository? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, - authorAssociation: Components.Schemas.AuthorAssociation, + authorAssociation: Components.Schemas.AuthorAssociation? = nil, reactions: Components.Schemas.ReactionRollup? = nil, subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil, + parentIssueUrl: Swift.String? = nil, issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil, issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil ) { @@ -4326,6 +4368,7 @@ public enum Components { self.authorAssociation = authorAssociation self.reactions = reactions self.subIssuesSummary = subIssuesSummary + self.parentIssueUrl = parentIssueUrl self.issueDependenciesSummary = issueDependenciesSummary self.issueFieldValues = issueFieldValues } @@ -4366,6 +4409,7 @@ public enum Components { case authorAssociation = "author_association" case reactions case subIssuesSummary = "sub_issues_summary" + case parentIssueUrl = "parent_issue_url" case issueDependenciesSummary = "issue_dependencies_summary" case issueFieldValues = "issue_field_values" } @@ -5042,11 +5086,15 @@ public enum Components { /// - Remark: Generated from `#/components/schemas/nullable-issue/performed_via_github_app`. public var performedViaGithubApp: Components.Schemas.NullableIntegration? /// - Remark: Generated from `#/components/schemas/nullable-issue/author_association`. - public var authorAssociation: Components.Schemas.AuthorAssociation + public var authorAssociation: Components.Schemas.AuthorAssociation? /// - Remark: Generated from `#/components/schemas/nullable-issue/reactions`. public var reactions: Components.Schemas.ReactionRollup? /// - Remark: Generated from `#/components/schemas/nullable-issue/sub_issues_summary`. public var subIssuesSummary: Components.Schemas.SubIssuesSummary? + /// URL to get the parent issue of this issue, if it is a sub-issue + /// + /// - Remark: Generated from `#/components/schemas/nullable-issue/parent_issue_url`. + public var parentIssueUrl: Swift.String? /// - Remark: Generated from `#/components/schemas/nullable-issue/issue_dependencies_summary`. public var issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? /// - Remark: Generated from `#/components/schemas/nullable-issue/issue_field_values`. @@ -5090,6 +5138,7 @@ public enum Components { /// - authorAssociation: /// - reactions: /// - subIssuesSummary: + /// - parentIssueUrl: URL to get the parent issue of this issue, if it is a sub-issue /// - issueDependenciesSummary: /// - issueFieldValues: public init( @@ -5126,9 +5175,10 @@ public enum Components { _type: Components.Schemas.IssueType? = nil, repository: Components.Schemas.Repository? = nil, performedViaGithubApp: Components.Schemas.NullableIntegration? = nil, - authorAssociation: Components.Schemas.AuthorAssociation, + authorAssociation: Components.Schemas.AuthorAssociation? = nil, reactions: Components.Schemas.ReactionRollup? = nil, subIssuesSummary: Components.Schemas.SubIssuesSummary? = nil, + parentIssueUrl: Swift.String? = nil, issueDependenciesSummary: Components.Schemas.IssueDependenciesSummary? = nil, issueFieldValues: [Components.Schemas.IssueFieldValue]? = nil ) { @@ -5168,6 +5218,7 @@ public enum Components { self.authorAssociation = authorAssociation self.reactions = reactions self.subIssuesSummary = subIssuesSummary + self.parentIssueUrl = parentIssueUrl self.issueDependenciesSummary = issueDependenciesSummary self.issueFieldValues = issueFieldValues } @@ -5208,6 +5259,7 @@ public enum Components { case authorAssociation = "author_association" case reactions case subIssuesSummary = "sub_issues_summary" + case parentIssueUrl = "parent_issue_url" case issueDependenciesSummary = "issue_dependencies_summary" case issueFieldValues = "issue_field_values" } @@ -17493,6 +17545,230 @@ public enum Operations { } } } + /// Get parent issue + /// + /// You can use the REST API to get the parent issue of a sub-issue. + /// + /// This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). + /// + /// - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + /// - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + /// - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + /// - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// - Remark: HTTP `GET /repos/{owner}/{repo}/issues/{issue_number}/parent`. + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)`. + public enum IssuesGetParent { + public static let id: Swift.String = "issues/get-parent" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/parent/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}/issues/{issue_number}/parent/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}/issues/{issue_number}/parent/GET/path/repo`. + public var repo: Components.Parameters.Repo + /// The number that identifies the issue. + /// + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/parent/GET/path/issue_number`. + public var issueNumber: Components.Parameters.IssueNumber + /// 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. + /// - issueNumber: The number that identifies the issue. + public init( + owner: Components.Parameters.Owner, + repo: Components.Parameters.Repo, + issueNumber: Components.Parameters.IssueNumber + ) { + self.owner = owner + self.repo = repo + self.issueNumber = issueNumber + } + } + public var path: Operations.IssuesGetParent.Input.Path + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/parent/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.IssuesGetParent.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.IssuesGetParent.Input.Path, + headers: Operations.IssuesGetParent.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}/issues/{issue_number}/parent/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/repos/{owner}/{repo}/issues/{issue_number}/parent/GET/responses/200/content/application\/json`. + case json(Components.Schemas.Issue) + /// 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 { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.IssuesGetParent.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.IssuesGetParent.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.IssuesGetParent.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.IssuesGetParent.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Moved permanently + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)/responses/301`. + /// + /// HTTP response code: `301 movedPermanently`. + case movedPermanently(Components.Responses.MovedPermanently) + /// The associated value of the enum case if `self` is `.movedPermanently`. + /// + /// - Throws: An error if `self` is not `.movedPermanently`. + /// - SeeAlso: `.movedPermanently`. + public var movedPermanently: Components.Responses.MovedPermanently { + get throws { + switch self { + case let .movedPermanently(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "movedPermanently", + response: self + ) + } + } + } + /// Resource not found + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)/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 + ) + } + } + } + /// Gone + /// + /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/issues/{issue_number}/parent/get(issues/get-parent)/responses/410`. + /// + /// HTTP response code: `410 gone`. + case gone(Components.Responses.Gone) + /// The associated value of the enum case if `self` is `.gone`. + /// + /// - Throws: An error if `self` is not `.gone`. + /// - SeeAlso: `.gone`. + public var gone: Components.Responses.Gone { + get throws { + switch self { + case let .gone(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "gone", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// Remove sub-issue /// /// You can use the REST API to remove a sub-issue from an issue. diff --git a/Sources/orgs/Client.swift b/Sources/orgs/Client.swift index dee0f32146..b8bd46122c 100644 --- a/Sources/orgs/Client.swift +++ b/Sources/orgs/Client.swift @@ -464,6 +464,148 @@ public struct Client: APIProtocol { } ) } + /// Create artifact metadata storage record + /// + /// Create metadata storage records for artifacts associated with an organization. + /// This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and + /// associated with a repository owned by the organization. + /// + /// - Remark: HTTP `POST /orgs/{org}/artifacts/metadata/storage-record`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/metadata/storage-record/post(orgs/create-artifact-storage-record)`. + public func orgsCreateArtifactStorageRecord(_ input: Operations.OrgsCreateArtifactStorageRecord.Input) async throws -> Operations.OrgsCreateArtifactStorageRecord.Output { + try await client.send( + input: input, + forOperation: Operations.OrgsCreateArtifactStorageRecord.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/artifacts/metadata/storage-record", + parameters: [ + input.path.org + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body.JsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// List artifact storage records + /// + /// List a collection of artifact storage records with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of storage records returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `content:read` permission is required. + /// + /// - Remark: HTTP `GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/get(orgs/list-artifact-storage-records)`. + public func orgsListArtifactStorageRecords(_ input: Operations.OrgsListArtifactStorageRecords.Input) async throws -> Operations.OrgsListArtifactStorageRecords.Output { + try await client.send( + input: input, + forOperation: Operations.OrgsListArtifactStorageRecords.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/orgs/{}/artifacts/{}/metadata/storage-records", + parameters: [ + input.path.org, + input.path.subjectDigest + ] + ) + 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.OrgsListArtifactStorageRecords.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Operations.OrgsListArtifactStorageRecords.Output.Ok.Body.JsonPayload.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// List attestations by bulk subject digests /// /// List a collection of artifact attestations associated with any entry in a list of subject digests owned by an organization. diff --git a/Sources/orgs/Types.swift b/Sources/orgs/Types.swift index b708dfd4a1..e7be3d7e74 100644 --- a/Sources/orgs/Types.swift +++ b/Sources/orgs/Types.swift @@ -66,6 +66,24 @@ public protocol APIProtocol: Sendable { /// - Remark: HTTP `DELETE /orgs/{org}`. /// - Remark: Generated from `#/paths//orgs/{org}/delete(orgs/delete)`. func orgsDelete(_ input: Operations.OrgsDelete.Input) async throws -> Operations.OrgsDelete.Output + /// Create artifact metadata storage record + /// + /// Create metadata storage records for artifacts associated with an organization. + /// This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and + /// associated with a repository owned by the organization. + /// + /// - Remark: HTTP `POST /orgs/{org}/artifacts/metadata/storage-record`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/metadata/storage-record/post(orgs/create-artifact-storage-record)`. + func orgsCreateArtifactStorageRecord(_ input: Operations.OrgsCreateArtifactStorageRecord.Input) async throws -> Operations.OrgsCreateArtifactStorageRecord.Output + /// List artifact storage records + /// + /// List a collection of artifact storage records with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of storage records returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `content:read` permission is required. + /// + /// - Remark: HTTP `GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/get(orgs/list-artifact-storage-records)`. + func orgsListArtifactStorageRecords(_ input: Operations.OrgsListArtifactStorageRecords.Input) async throws -> Operations.OrgsListArtifactStorageRecords.Output /// List attestations by bulk subject digests /// /// List a collection of artifact attestations associated with any entry in a list of subject digests owned by an organization. @@ -1001,6 +1019,42 @@ extension APIProtocol { headers: headers )) } + /// Create artifact metadata storage record + /// + /// Create metadata storage records for artifacts associated with an organization. + /// This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and + /// associated with a repository owned by the organization. + /// + /// - Remark: HTTP `POST /orgs/{org}/artifacts/metadata/storage-record`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/metadata/storage-record/post(orgs/create-artifact-storage-record)`. + public func orgsCreateArtifactStorageRecord( + path: Operations.OrgsCreateArtifactStorageRecord.Input.Path, + headers: Operations.OrgsCreateArtifactStorageRecord.Input.Headers = .init(), + body: Operations.OrgsCreateArtifactStorageRecord.Input.Body + ) async throws -> Operations.OrgsCreateArtifactStorageRecord.Output { + try await orgsCreateArtifactStorageRecord(Operations.OrgsCreateArtifactStorageRecord.Input( + path: path, + headers: headers, + body: body + )) + } + /// List artifact storage records + /// + /// List a collection of artifact storage records with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of storage records returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `content:read` permission is required. + /// + /// - Remark: HTTP `GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/get(orgs/list-artifact-storage-records)`. + public func orgsListArtifactStorageRecords( + path: Operations.OrgsListArtifactStorageRecords.Input.Path, + headers: Operations.OrgsListArtifactStorageRecords.Input.Headers = .init() + ) async throws -> Operations.OrgsListArtifactStorageRecords.Output { + try await orgsListArtifactStorageRecords(Operations.OrgsListArtifactStorageRecords.Input( + path: path, + headers: headers + )) + } /// List attestations by bulk subject digests /// /// List a collection of artifact attestations associated with any entry in a list of subject digests owned by an organization. @@ -10038,6 +10092,549 @@ public enum Operations { } } } + /// Create artifact metadata storage record + /// + /// Create metadata storage records for artifacts associated with an organization. + /// This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and + /// associated with a repository owned by the organization. + /// + /// - Remark: HTTP `POST /orgs/{org}/artifacts/metadata/storage-record`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/metadata/storage-record/post(orgs/create-artifact-storage-record)`. + public enum OrgsCreateArtifactStorageRecord { + public static let id: Swift.String = "orgs/create-artifact-storage-record" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/path/org`. + public var org: Components.Parameters.Org + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + public init(org: Components.Parameters.Org) { + self.org = org + } + } + public var path: Operations.OrgsCreateArtifactStorageRecord.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.OrgsCreateArtifactStorageRecord.Input.Headers + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// The name of the artifact. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/name`. + public var name: Swift.String + /// The digest of the artifact (algorithm:hex-encoded-digest). + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/digest`. + public var digest: Swift.String + /// The URL where the artifact is stored. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/artifact_url`. + public var artifactUrl: Swift.String? + /// The path of the artifact. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/path`. + public var path: Swift.String? + /// The base URL of the artifact registry. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/registry_url`. + public var registryUrl: Swift.String + /// The repository name within the registry. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/repository`. + public var repository: Swift.String? + /// The status of the artifact (e.g., active, inactive). + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case active = "active" + case eol = "eol" + case deleted = "deleted" + } + /// The status of the artifact (e.g., active, inactive). + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/json/status`. + public var status: Operations.OrgsCreateArtifactStorageRecord.Input.Body.JsonPayload.StatusPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - name: The name of the artifact. + /// - digest: The digest of the artifact (algorithm:hex-encoded-digest). + /// - artifactUrl: The URL where the artifact is stored. + /// - path: The path of the artifact. + /// - registryUrl: The base URL of the artifact registry. + /// - repository: The repository name within the registry. + /// - status: The status of the artifact (e.g., active, inactive). + public init( + name: Swift.String, + digest: Swift.String, + artifactUrl: Swift.String? = nil, + path: Swift.String? = nil, + registryUrl: Swift.String, + repository: Swift.String? = nil, + status: Operations.OrgsCreateArtifactStorageRecord.Input.Body.JsonPayload.StatusPayload? = nil + ) { + self.name = name + self.digest = digest + self.artifactUrl = artifactUrl + self.path = path + self.registryUrl = registryUrl + self.repository = repository + self.status = status + } + public enum CodingKeys: String, CodingKey { + case name + case digest + case artifactUrl = "artifact_url" + case path + case registryUrl = "registry_url" + case repository + case status + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/requestBody/content/application\/json`. + case json(Operations.OrgsCreateArtifactStorageRecord.Input.Body.JsonPayload) + } + public var body: Operations.OrgsCreateArtifactStorageRecord.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.OrgsCreateArtifactStorageRecord.Input.Path, + headers: Operations.OrgsCreateArtifactStorageRecord.Input.Headers = .init(), + body: Operations.OrgsCreateArtifactStorageRecord.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/total_count`. + public var totalCount: Swift.Int? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload`. + public struct StorageRecordsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/id`. + public var id: Swift.Int? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/digest`. + public var digest: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/artifact_url`. + public var artifactUrl: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/registry_url`. + public var registryUrl: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/repository`. + public var repository: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/status`. + public var status: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/created_at`. + public var createdAt: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/StorageRecordsPayload/updated_at`. + public var updatedAt: Swift.String? + /// Creates a new `StorageRecordsPayloadPayload`. + /// + /// - Parameters: + /// - id: + /// - name: + /// - digest: + /// - artifactUrl: + /// - registryUrl: + /// - repository: + /// - status: + /// - createdAt: + /// - updatedAt: + public init( + id: Swift.Int? = nil, + name: Swift.String? = nil, + digest: Swift.String? = nil, + artifactUrl: Swift.String? = nil, + registryUrl: Swift.String? = nil, + repository: Swift.String? = nil, + status: Swift.String? = nil, + createdAt: Swift.String? = nil, + updatedAt: Swift.String? = nil + ) { + self.id = id + self.name = name + self.digest = digest + self.artifactUrl = artifactUrl + self.registryUrl = registryUrl + self.repository = repository + self.status = status + self.createdAt = createdAt + self.updatedAt = updatedAt + } + public enum CodingKeys: String, CodingKey { + case id + case name + case digest + case artifactUrl = "artifact_url" + case registryUrl = "registry_url" + case repository + case status + case createdAt = "created_at" + case updatedAt = "updated_at" + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/storage_records`. + public typealias StorageRecordsPayload = [Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body.JsonPayload.StorageRecordsPayloadPayload] + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/json/storage_records`. + public var storageRecords: Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body.JsonPayload.StorageRecordsPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - totalCount: + /// - storageRecords: + public init( + totalCount: Swift.Int? = nil, + storageRecords: Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body.JsonPayload.StorageRecordsPayload? = nil + ) { + self.totalCount = totalCount + self.storageRecords = storageRecords + } + public enum CodingKeys: String, CodingKey { + case totalCount = "total_count" + case storageRecords = "storage_records" + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/metadata/storage-record/POST/responses/200/content/application\/json`. + case json(Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.OrgsCreateArtifactStorageRecord.Output.Ok.Body) { + self.body = body + } + } + /// Artifact metadata storage record stored successfully. + /// + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/metadata/storage-record/post(orgs/create-artifact-storage-record)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.OrgsCreateArtifactStorageRecord.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.OrgsCreateArtifactStorageRecord.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// List artifact storage records + /// + /// List a collection of artifact storage records with a given subject digest that are associated with repositories owned by an organization. + /// + /// The collection of storage records returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `content:read` permission is required. + /// + /// - Remark: HTTP `GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records`. + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/get(orgs/list-artifact-storage-records)`. + public enum OrgsListArtifactStorageRecords { + public static let id: Swift.String = "orgs/list-artifact-storage-records" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/path`. + public struct Path: Sendable, Hashable { + /// The organization name. The name is not case sensitive. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/path/org`. + public var org: Components.Parameters.Org + /// The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/path/subject_digest`. + public var subjectDigest: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - org: The organization name. The name is not case sensitive. + /// - subjectDigest: The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + public init( + org: Components.Parameters.Org, + subjectDigest: Swift.String + ) { + self.org = org + self.subjectDigest = subjectDigest + } + } + public var path: Operations.OrgsListArtifactStorageRecords.Input.Path + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/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.OrgsListArtifactStorageRecords.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + public init( + path: Operations.OrgsListArtifactStorageRecords.Input.Path, + headers: Operations.OrgsListArtifactStorageRecords.Input.Headers = .init() + ) { + self.path = path + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json`. + public struct JsonPayload: Codable, Hashable, Sendable { + /// The number of storage records for this digest and organization + /// + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/total_count`. + public var totalCount: Swift.Int? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload`. + public struct StorageRecordsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/id`. + public var id: Swift.Int? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/digest`. + public var digest: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/artifact_url`. + public var artifactUrl: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/registry_url`. + public var registryUrl: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/repository`. + public var repository: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/status`. + public var status: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/created_at`. + public var createdAt: Swift.String? + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/StorageRecordsPayload/updated_at`. + public var updatedAt: Swift.String? + /// Creates a new `StorageRecordsPayloadPayload`. + /// + /// - Parameters: + /// - id: + /// - name: + /// - digest: + /// - artifactUrl: + /// - registryUrl: + /// - repository: + /// - status: + /// - createdAt: + /// - updatedAt: + public init( + id: Swift.Int? = nil, + name: Swift.String? = nil, + digest: Swift.String? = nil, + artifactUrl: Swift.String? = nil, + registryUrl: Swift.String? = nil, + repository: Swift.String? = nil, + status: Swift.String? = nil, + createdAt: Swift.String? = nil, + updatedAt: Swift.String? = nil + ) { + self.id = id + self.name = name + self.digest = digest + self.artifactUrl = artifactUrl + self.registryUrl = registryUrl + self.repository = repository + self.status = status + self.createdAt = createdAt + self.updatedAt = updatedAt + } + public enum CodingKeys: String, CodingKey { + case id + case name + case digest + case artifactUrl = "artifact_url" + case registryUrl = "registry_url" + case repository + case status + case createdAt = "created_at" + case updatedAt = "updated_at" + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/storage_records`. + public typealias StorageRecordsPayload = [Operations.OrgsListArtifactStorageRecords.Output.Ok.Body.JsonPayload.StorageRecordsPayloadPayload] + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/json/storage_records`. + public var storageRecords: Operations.OrgsListArtifactStorageRecords.Output.Ok.Body.JsonPayload.StorageRecordsPayload? + /// Creates a new `JsonPayload`. + /// + /// - Parameters: + /// - totalCount: The number of storage records for this digest and organization + /// - storageRecords: + public init( + totalCount: Swift.Int? = nil, + storageRecords: Operations.OrgsListArtifactStorageRecords.Output.Ok.Body.JsonPayload.StorageRecordsPayload? = nil + ) { + self.totalCount = totalCount + self.storageRecords = storageRecords + } + public enum CodingKeys: String, CodingKey { + case totalCount = "total_count" + case storageRecords = "storage_records" + } + } + /// - Remark: Generated from `#/paths/orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/GET/responses/200/content/application\/json`. + case json(Operations.OrgsListArtifactStorageRecords.Output.Ok.Body.JsonPayload) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Operations.OrgsListArtifactStorageRecords.Output.Ok.Body.JsonPayload { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.OrgsListArtifactStorageRecords.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.OrgsListArtifactStorageRecords.Output.Ok.Body) { + self.body = body + } + } + /// Response + /// + /// - Remark: Generated from `#/paths//orgs/{org}/artifacts/{subject_digest}/metadata/storage-records/get(orgs/list-artifact-storage-records)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.OrgsListArtifactStorageRecords.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.OrgsListArtifactStorageRecords.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } /// List attestations by bulk subject digests /// /// List a collection of artifact attestations associated with any entry in a list of subject digests owned by an organization. diff --git a/Sources/projects-classic/Client.swift b/Sources/projects-classic/Client.swift index 6a350dafed..c8f33335d8 100644 --- a/Sources/projects-classic/Client.swift +++ b/Sources/projects-classic/Client.swift @@ -342,24 +342,24 @@ public struct Client: APIProtocol { } ) } - /// Get a project card + /// Get a project column /// /// > [!WARNING] /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. /// - /// - Remark: HTTP `GET /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)`. + /// - Remark: HTTP `GET /projects/columns/{column_id}`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)`. @available(*, deprecated) - public func projectsClassicGetCard(_ input: Operations.ProjectsClassicGetCard.Input) async throws -> Operations.ProjectsClassicGetCard.Output { + public func projectsClassicGetColumn(_ input: Operations.ProjectsClassicGetColumn.Input) async throws -> Operations.ProjectsClassicGetColumn.Output { try await client.send( input: input, - forOperation: Operations.ProjectsClassicGetCard.id, + forOperation: Operations.ProjectsClassicGetColumn.id, serializer: { input in let path = try converter.renderedPath( - template: "/projects/columns/cards/{}", + template: "/projects/columns/{}", parameters: [ - input.path.cardId + input.path.columnId ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -377,7 +377,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicGetCard.Output.Ok.Body + let body: Operations.ProjectsClassicGetColumn.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -387,7 +387,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProjectCard.self, + Components.Schemas.ProjectColumn.self, from: responseBody, transforming: { value in .json(value) @@ -421,9 +421,9 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .forbidden(.init(body: body)) - case 401: + case 404: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.Body + let body: Components.Responses.NotFound.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -442,10 +442,10 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .unauthorized(.init(body: body)) - case 404: + return .notFound(.init(body: body)) + case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.NotFound.Body + let body: Components.Responses.RequiresAuthentication.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -464,7 +464,7 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .notFound(.init(body: body)) + return .unauthorized(.init(body: body)) default: return .undocumented( statusCode: response.status.code, @@ -477,24 +477,24 @@ public struct Client: APIProtocol { } ) } - /// Update an existing project card + /// Update an existing project column /// /// > [!WARNING] /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. /// - /// - Remark: HTTP `PATCH /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)`. + /// - Remark: HTTP `PATCH /projects/columns/{column_id}`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)`. @available(*, deprecated) - public func projectsClassicUpdateCard(_ input: Operations.ProjectsClassicUpdateCard.Input) async throws -> Operations.ProjectsClassicUpdateCard.Output { + public func projectsClassicUpdateColumn(_ input: Operations.ProjectsClassicUpdateColumn.Input) async throws -> Operations.ProjectsClassicUpdateColumn.Output { try await client.send( input: input, - forOperation: Operations.ProjectsClassicUpdateCard.id, + forOperation: Operations.ProjectsClassicUpdateColumn.id, serializer: { input in let path = try converter.renderedPath( - template: "/projects/columns/cards/{}", + template: "/projects/columns/{}", parameters: [ - input.path.cardId + input.path.columnId ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -508,10 +508,8 @@ public struct Client: APIProtocol { ) let body: OpenAPIRuntime.HTTPBody? switch input.body { - case .none: - body = nil case let .json(value): - body = try converter.setOptionalRequestBodyAsJSON( + body = try converter.setRequiredRequestBodyAsJSON( value, headerFields: &request.headerFields, contentType: "application/json; charset=utf-8" @@ -523,7 +521,7 @@ public struct Client: APIProtocol { switch response.status.code { case 200: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicUpdateCard.Output.Ok.Body + let body: Operations.ProjectsClassicUpdateColumn.Output.Ok.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -533,7 +531,7 @@ public struct Client: APIProtocol { switch chosenContentType { case "application/json": body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProjectCard.self, + Components.Schemas.ProjectColumn.self, from: responseBody, transforming: { value in .json(value) @@ -589,50 +587,6 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) - case 404: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.NotFound.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.BasicError.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .notFound(.init(body: body)) - case 422: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.ValidationFailedSimple.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ValidationErrorSimple.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .unprocessableContent(.init(body: body)) default: return .undocumented( statusCode: response.status.code, @@ -645,24 +599,24 @@ public struct Client: APIProtocol { } ) } - /// Delete a project card + /// Delete a project column /// /// > [!WARNING] /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. /// - /// - Remark: HTTP `DELETE /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)`. + /// - Remark: HTTP `DELETE /projects/columns/{column_id}`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)`. @available(*, deprecated) - public func projectsClassicDeleteCard(_ input: Operations.ProjectsClassicDeleteCard.Input) async throws -> Operations.ProjectsClassicDeleteCard.Output { + public func projectsClassicDeleteColumn(_ input: Operations.ProjectsClassicDeleteColumn.Input) async throws -> Operations.ProjectsClassicDeleteColumn.Output { try await client.send( input: input, - forOperation: Operations.ProjectsClassicDeleteCard.id, + forOperation: Operations.ProjectsClassicDeleteColumn.id, serializer: { input in let path = try converter.renderedPath( - template: "/projects/columns/cards/{}", + template: "/projects/columns/{}", parameters: [ - input.path.cardId + input.path.columnId ] ) var request: HTTPTypes.HTTPRequest = .init( @@ -684,51 +638,7 @@ public struct Client: APIProtocol { return .notModified(.init()) case 403: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicDeleteCard.Output.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.ProjectsClassicDeleteCard.Output.Forbidden.Body.JsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.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 .unauthorized(.init(body: body)) - case 404: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.NotFound.Body + let body: Components.Responses.Forbidden.Body let chosenContentType = try converter.bestContentType( received: contentType, options: [ @@ -747,106 +657,6 @@ public struct Client: APIProtocol { default: preconditionFailure("bestContentType chose an invalid content type.") } - return .notFound(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// Move a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/cards/{card_id}/moves`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)`. - @available(*, deprecated) - public func projectsClassicMoveCard(_ input: Operations.ProjectsClassicMoveCard.Input) async throws -> Operations.ProjectsClassicMoveCard.Output { - try await client.send( - input: input, - forOperation: Operations.ProjectsClassicMoveCard.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/projects/columns/cards/{}/moves", - parameters: [ - input.path.cardId - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .post - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 201: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicMoveCard.Output.Created.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.ProjectsClassicMoveCard.Output.Created.Body.JsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .created(.init(body: body)) - case 304: - return .notModified(.init()) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicMoveCard.Output.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.ProjectsClassicMoveCard.Output.Forbidden.Body.JsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } return .forbidden(.init(body: body)) case 401: let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) @@ -870,708 +680,6 @@ public struct Client: APIProtocol { preconditionFailure("bestContentType chose an invalid content type.") } return .unauthorized(.init(body: body)) - case 503: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body.JsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .serviceUnavailable(.init(body: body)) - case 422: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.ValidationFailed.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ValidationError.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .unprocessableContent(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// Get a project column - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/{column_id}`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)`. - @available(*, deprecated) - public func projectsClassicGetColumn(_ input: Operations.ProjectsClassicGetColumn.Input) async throws -> Operations.ProjectsClassicGetColumn.Output { - try await client.send( - input: input, - forOperation: Operations.ProjectsClassicGetColumn.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/projects/columns/{}", - parameters: [ - input.path.columnId - ] - ) - 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.ProjectsClassicGetColumn.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.ProjectColumn.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) - case 304: - return .notModified(.init()) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.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 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.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 .unauthorized(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// Update an existing project column - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `PATCH /projects/columns/{column_id}`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)`. - @available(*, deprecated) - public func projectsClassicUpdateColumn(_ input: Operations.ProjectsClassicUpdateColumn.Input) async throws -> Operations.ProjectsClassicUpdateColumn.Output { - try await client.send( - input: input, - forOperation: Operations.ProjectsClassicUpdateColumn.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/projects/columns/{}", - parameters: [ - input.path.columnId - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .patch - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 200: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicUpdateColumn.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.ProjectColumn.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init(body: body)) - case 304: - return .notModified(.init()) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.BasicError.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.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 .unauthorized(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// Delete a project column - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `DELETE /projects/columns/{column_id}`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)`. - @available(*, deprecated) - public func projectsClassicDeleteColumn(_ input: Operations.ProjectsClassicDeleteColumn.Input) async throws -> Operations.ProjectsClassicDeleteColumn.Output { - try await client.send( - input: input, - forOperation: Operations.ProjectsClassicDeleteColumn.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/projects/columns/{}", - parameters: [ - input.path.columnId - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .delete - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - return (request, nil) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 204: - return .noContent(.init()) - case 304: - return .notModified(.init()) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.BasicError.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.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 .unauthorized(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// List project cards - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)`. - @available(*, deprecated) - public func projectsClassicListCards(_ input: Operations.ProjectsClassicListCards.Input) async throws -> Operations.ProjectsClassicListCards.Output { - try await client.send( - input: input, - forOperation: Operations.ProjectsClassicListCards.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/projects/columns/{}/cards", - parameters: [ - input.path.columnId - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .get - ) - suppressMutabilityWarning(&request) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "archived_state", - value: input.query.archivedState - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "per_page", - value: input.query.perPage - ) - try converter.setQueryItemAsURI( - in: &request, - style: .form, - explode: true, - name: "page", - value: input.query.page - ) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - return (request, nil) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 200: - let headers: Operations.ProjectsClassicListCards.Output.Ok.Headers = .init(link: try converter.getOptionalHeaderFieldAsURI( - in: response.headerFields, - name: "Link", - as: Components.Headers.Link.self - )) - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicListCards.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.ProjectCard].self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .ok(.init( - headers: headers, - body: body - )) - case 304: - return .notModified(.init()) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.BasicError.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.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 .unauthorized(.init(body: body)) - default: - return .undocumented( - statusCode: response.status.code, - .init( - headerFields: response.headerFields, - body: responseBody - ) - ) - } - } - ) - } - /// Create a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)`. - @available(*, deprecated) - public func projectsClassicCreateCard(_ input: Operations.ProjectsClassicCreateCard.Input) async throws -> Operations.ProjectsClassicCreateCard.Output { - try await client.send( - input: input, - forOperation: Operations.ProjectsClassicCreateCard.id, - serializer: { input in - let path = try converter.renderedPath( - template: "/projects/columns/{}/cards", - parameters: [ - input.path.columnId - ] - ) - var request: HTTPTypes.HTTPRequest = .init( - soar_path: path, - method: .post - ) - suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) - let body: OpenAPIRuntime.HTTPBody? - switch input.body { - case let .json(value): - body = try converter.setRequiredRequestBodyAsJSON( - value, - headerFields: &request.headerFields, - contentType: "application/json; charset=utf-8" - ) - } - return (request, body) - }, - deserializer: { response, responseBody in - switch response.status.code { - case 201: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicCreateCard.Output.Created.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.ProjectCard.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .created(.init(body: body)) - case 304: - return .notModified(.init()) - case 403: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.Forbidden.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Components.Schemas.BasicError.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .forbidden(.init(body: body)) - case 401: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Components.Responses.RequiresAuthentication.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 .unauthorized(.init(body: body)) - case 422: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicCreateCard.Output.UnprocessableContent.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.ProjectsClassicCreateCard.Output.UnprocessableContent.Body.JsonPayload.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .unprocessableContent(.init(body: body)) - case 503: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - Operations.ProjectsClassicCreateCard.Output.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, diff --git a/Sources/projects-classic/Types.swift b/Sources/projects-classic/Types.swift index 1f1851d56e..2ddc354a99 100644 --- a/Sources/projects-classic/Types.swift +++ b/Sources/projects-classic/Types.swift @@ -31,46 +31,6 @@ public protocol APIProtocol: Sendable { /// - Remark: Generated from `#/paths//orgs/{org}/projects/post(projects-classic/create-for-org)`. @available(*, deprecated) func projectsClassicCreateForOrg(_ input: Operations.ProjectsClassicCreateForOrg.Input) async throws -> Operations.ProjectsClassicCreateForOrg.Output - /// Get a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)`. - @available(*, deprecated) - func projectsClassicGetCard(_ input: Operations.ProjectsClassicGetCard.Input) async throws -> Operations.ProjectsClassicGetCard.Output - /// Update an existing project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `PATCH /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)`. - @available(*, deprecated) - func projectsClassicUpdateCard(_ input: Operations.ProjectsClassicUpdateCard.Input) async throws -> Operations.ProjectsClassicUpdateCard.Output - /// Delete a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `DELETE /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)`. - @available(*, deprecated) - func projectsClassicDeleteCard(_ input: Operations.ProjectsClassicDeleteCard.Input) async throws -> Operations.ProjectsClassicDeleteCard.Output - /// Move a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/cards/{card_id}/moves`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)`. - @available(*, deprecated) - func projectsClassicMoveCard(_ input: Operations.ProjectsClassicMoveCard.Input) async throws -> Operations.ProjectsClassicMoveCard.Output /// Get a project column /// /// > [!WARNING] @@ -101,26 +61,6 @@ public protocol APIProtocol: Sendable { /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)`. @available(*, deprecated) func projectsClassicDeleteColumn(_ input: Operations.ProjectsClassicDeleteColumn.Input) async throws -> Operations.ProjectsClassicDeleteColumn.Output - /// List project cards - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)`. - @available(*, deprecated) - func projectsClassicListCards(_ input: Operations.ProjectsClassicListCards.Input) async throws -> Operations.ProjectsClassicListCards.Output - /// Create a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)`. - @available(*, deprecated) - func projectsClassicCreateCard(_ input: Operations.ProjectsClassicCreateCard.Input) async throws -> Operations.ProjectsClassicCreateCard.Output /// Move a project column /// /// > [!WARNING] @@ -305,82 +245,6 @@ extension APIProtocol { body: body )) } - /// Get a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)`. - @available(*, deprecated) - public func projectsClassicGetCard( - path: Operations.ProjectsClassicGetCard.Input.Path, - headers: Operations.ProjectsClassicGetCard.Input.Headers = .init() - ) async throws -> Operations.ProjectsClassicGetCard.Output { - try await projectsClassicGetCard(Operations.ProjectsClassicGetCard.Input( - path: path, - headers: headers - )) - } - /// Update an existing project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `PATCH /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)`. - @available(*, deprecated) - public func projectsClassicUpdateCard( - path: Operations.ProjectsClassicUpdateCard.Input.Path, - headers: Operations.ProjectsClassicUpdateCard.Input.Headers = .init(), - body: Operations.ProjectsClassicUpdateCard.Input.Body? = nil - ) async throws -> Operations.ProjectsClassicUpdateCard.Output { - try await projectsClassicUpdateCard(Operations.ProjectsClassicUpdateCard.Input( - path: path, - headers: headers, - body: body - )) - } - /// Delete a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `DELETE /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)`. - @available(*, deprecated) - public func projectsClassicDeleteCard( - path: Operations.ProjectsClassicDeleteCard.Input.Path, - headers: Operations.ProjectsClassicDeleteCard.Input.Headers = .init() - ) async throws -> Operations.ProjectsClassicDeleteCard.Output { - try await projectsClassicDeleteCard(Operations.ProjectsClassicDeleteCard.Input( - path: path, - headers: headers - )) - } - /// Move a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/cards/{card_id}/moves`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)`. - @available(*, deprecated) - public func projectsClassicMoveCard( - path: Operations.ProjectsClassicMoveCard.Input.Path, - headers: Operations.ProjectsClassicMoveCard.Input.Headers = .init(), - body: Operations.ProjectsClassicMoveCard.Input.Body - ) async throws -> Operations.ProjectsClassicMoveCard.Output { - try await projectsClassicMoveCard(Operations.ProjectsClassicMoveCard.Input( - path: path, - headers: headers, - body: body - )) - } /// Get a project column /// /// > [!WARNING] @@ -437,46 +301,6 @@ extension APIProtocol { headers: headers )) } - /// List project cards - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)`. - @available(*, deprecated) - public func projectsClassicListCards( - path: Operations.ProjectsClassicListCards.Input.Path, - query: Operations.ProjectsClassicListCards.Input.Query = .init(), - headers: Operations.ProjectsClassicListCards.Input.Headers = .init() - ) async throws -> Operations.ProjectsClassicListCards.Output { - try await projectsClassicListCards(Operations.ProjectsClassicListCards.Input( - path: path, - query: query, - headers: headers - )) - } - /// Create a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)`. - @available(*, deprecated) - public func projectsClassicCreateCard( - path: Operations.ProjectsClassicCreateCard.Input.Path, - headers: Operations.ProjectsClassicCreateCard.Input.Headers = .init(), - body: Operations.ProjectsClassicCreateCard.Input.Body - ) async throws -> Operations.ProjectsClassicCreateCard.Output { - try await projectsClassicCreateCard(Operations.ProjectsClassicCreateCard.Input( - path: path, - headers: headers, - body: body - )) - } /// Move a project column /// /// > [!WARNING] @@ -1377,101 +1201,6 @@ public enum Components { case _private = "private" } } - /// Project cards represent a scope of work. - /// - /// - Remark: Generated from `#/components/schemas/project-card`. - public struct ProjectCard: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/project-card/url`. - public var url: Swift.String - /// The project card's ID - /// - /// - Remark: Generated from `#/components/schemas/project-card/id`. - public var id: Swift.Int64 - /// - Remark: Generated from `#/components/schemas/project-card/node_id`. - public var nodeId: Swift.String - /// - Remark: Generated from `#/components/schemas/project-card/note`. - public var note: Swift.String? - /// - Remark: Generated from `#/components/schemas/project-card/creator`. - public var creator: Components.Schemas.NullableSimpleUser? - /// - Remark: Generated from `#/components/schemas/project-card/created_at`. - public var createdAt: Foundation.Date - /// - Remark: Generated from `#/components/schemas/project-card/updated_at`. - public var updatedAt: Foundation.Date - /// Whether or not the card is archived - /// - /// - Remark: Generated from `#/components/schemas/project-card/archived`. - public var archived: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/project-card/column_name`. - public var columnName: Swift.String? - /// - Remark: Generated from `#/components/schemas/project-card/project_id`. - public var projectId: Swift.String? - /// - Remark: Generated from `#/components/schemas/project-card/column_url`. - public var columnUrl: Swift.String - /// - Remark: Generated from `#/components/schemas/project-card/content_url`. - public var contentUrl: Swift.String? - /// - Remark: Generated from `#/components/schemas/project-card/project_url`. - public var projectUrl: Swift.String - /// Creates a new `ProjectCard`. - /// - /// - Parameters: - /// - url: - /// - id: The project card's ID - /// - nodeId: - /// - note: - /// - creator: - /// - createdAt: - /// - updatedAt: - /// - archived: Whether or not the card is archived - /// - columnName: - /// - projectId: - /// - columnUrl: - /// - contentUrl: - /// - projectUrl: - public init( - url: Swift.String, - id: Swift.Int64, - nodeId: Swift.String, - note: Swift.String? = nil, - creator: Components.Schemas.NullableSimpleUser? = nil, - createdAt: Foundation.Date, - updatedAt: Foundation.Date, - archived: Swift.Bool? = nil, - columnName: Swift.String? = nil, - projectId: Swift.String? = nil, - columnUrl: Swift.String, - contentUrl: Swift.String? = nil, - projectUrl: Swift.String - ) { - self.url = url - self.id = id - self.nodeId = nodeId - self.note = note - self.creator = creator - self.createdAt = createdAt - self.updatedAt = updatedAt - self.archived = archived - self.columnName = columnName - self.projectId = projectId - self.columnUrl = columnUrl - self.contentUrl = contentUrl - self.projectUrl = projectUrl - } - public enum CodingKeys: String, CodingKey { - case url - case id - case nodeId = "node_id" - case note - case creator - case createdAt = "created_at" - case updatedAt = "updated_at" - case archived - case columnName = "column_name" - case projectId = "project_id" - case columnUrl = "column_url" - case contentUrl = "content_url" - case projectUrl = "project_url" - } - } /// Project columns contain cards of work. /// /// - Remark: Generated from `#/components/schemas/project-column`. @@ -1593,10 +1322,6 @@ public enum Components { /// /// - Remark: Generated from `#/components/parameters/project-id`. public typealias ProjectId = Swift.Int - /// The unique identifier of the card. - /// - /// - Remark: Generated from `#/components/parameters/card-id`. - public typealias CardId = Swift.Int /// The unique identifier of the column. /// /// - Remark: Generated from `#/components/parameters/column-id`. @@ -2289,52 +2014,52 @@ public enum Operations { } } } - /// Get a project card + /// Get a project column /// /// > [!WARNING] /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. /// - /// - Remark: HTTP `GET /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)`. - public enum ProjectsClassicGetCard { - public static let id: Swift.String = "projects-classic/get-card" + /// - Remark: HTTP `GET /projects/columns/{column_id}`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)`. + public enum ProjectsClassicGetColumn { + public static let id: Swift.String = "projects-classic/get-column" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/GET/path`. + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/path`. public struct Path: Sendable, Hashable { - /// The unique identifier of the card. + /// The unique identifier of the column. /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/GET/path/card_id`. - public var cardId: Components.Parameters.CardId + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/path/column_id`. + public var columnId: Components.Parameters.ColumnId /// Creates a new `Path`. /// /// - Parameters: - /// - cardId: The unique identifier of the card. - public init(cardId: Components.Parameters.CardId) { - self.cardId = cardId + /// - columnId: The unique identifier of the column. + public init(columnId: Components.Parameters.ColumnId) { + self.columnId = columnId } } - public var path: Operations.ProjectsClassicGetCard.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/GET/header`. + public var path: Operations.ProjectsClassicGetColumn.Input.Path + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ProjectsClassicGetCard.Input.Headers + public var headers: Operations.ProjectsClassicGetColumn.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.ProjectsClassicGetCard.Input.Path, - headers: Operations.ProjectsClassicGetCard.Input.Headers = .init() + path: Operations.ProjectsClassicGetColumn.Input.Path, + headers: Operations.ProjectsClassicGetColumn.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -2342,15 +2067,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/GET/responses/200/content`. + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.ProjectCard) + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.ProjectColumn) /// 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.ProjectCard { + public var json: Components.Schemas.ProjectColumn { get throws { switch self { case let .json(body): @@ -2360,26 +2085,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ProjectsClassicGetCard.Output.Ok.Body + public var body: Operations.ProjectsClassicGetColumn.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicGetCard.Output.Ok.Body) { + public init(body: Operations.ProjectsClassicGetColumn.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)/responses/200`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ProjectsClassicGetCard.Output.Ok) + case ok(Operations.ProjectsClassicGetColumn.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.ProjectsClassicGetCard.Output.Ok { + public var ok: Operations.ProjectsClassicGetColumn.Output.Ok { get throws { switch self { case let .ok(response): @@ -2394,13 +2119,13 @@ public enum Operations { } /// Not modified /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)/responses/304`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/304`. /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.NotModified) /// Not modified /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)/responses/304`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/304`. /// /// HTTP response code: `304 notModified`. public static var notModified: Self { @@ -2425,7 +2150,7 @@ public enum Operations { } /// Forbidden /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)/responses/403`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.Forbidden) @@ -2446,47 +2171,47 @@ public enum Operations { } } } - /// Requires authentication + /// Resource not found /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)/responses/401`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/404`. /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. + /// 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 `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Components.Responses.NotFound { get throws { switch self { - case let .unauthorized(response): + case let .notFound(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", + expectedStatus: "notFound", response: self ) } } } - /// Resource not found + /// Requires authentication /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/get(projects-classic/get-card)/responses/404`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/401`. /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.NotFound) - /// The associated value of the enum case if `self` is `.notFound`. + /// HTTP response code: `401 unauthorized`. + case unauthorized(Components.Responses.RequiresAuthentication) + /// The associated value of the enum case if `self` is `.unauthorized`. /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.NotFound { + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Components.Responses.RequiresAuthentication { get throws { switch self { - case let .notFound(response): + case let .unauthorized(response): return response default: try throwUnexpectedResponseStatus( - expectedStatus: "notFound", + expectedStatus: "unauthorized", response: self ) } @@ -2523,77 +2248,67 @@ public enum Operations { } } } - /// Update an existing project card + /// Update an existing project column /// /// > [!WARNING] /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. /// - /// - Remark: HTTP `PATCH /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)`. - public enum ProjectsClassicUpdateCard { - public static let id: Swift.String = "projects-classic/update-card" + /// - Remark: HTTP `PATCH /projects/columns/{column_id}`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)`. + public enum ProjectsClassicUpdateColumn { + public static let id: Swift.String = "projects-classic/update-column" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/path`. + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/path`. public struct Path: Sendable, Hashable { - /// The unique identifier of the card. + /// The unique identifier of the column. /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/path/card_id`. - public var cardId: Components.Parameters.CardId + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/path/column_id`. + public var columnId: Components.Parameters.ColumnId /// Creates a new `Path`. /// /// - Parameters: - /// - cardId: The unique identifier of the card. - public init(cardId: Components.Parameters.CardId) { - self.cardId = cardId + /// - columnId: The unique identifier of the column. + public init(columnId: Components.Parameters.ColumnId) { + self.columnId = columnId } } - public var path: Operations.ProjectsClassicUpdateCard.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/header`. + public var path: Operations.ProjectsClassicUpdateColumn.Input.Path + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ProjectsClassicUpdateCard.Input.Headers - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/requestBody`. + public var headers: Operations.ProjectsClassicUpdateColumn.Input.Headers + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/requestBody/json`. + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody/json`. public struct JsonPayload: Codable, Hashable, Sendable { - /// The project card's note - /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/requestBody/json/note`. - public var note: Swift.String? - /// Whether or not the card is archived + /// Name of the project column /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/requestBody/json/archived`. - public var archived: Swift.Bool? + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody/json/name`. + public var name: Swift.String /// Creates a new `JsonPayload`. /// /// - Parameters: - /// - note: The project card's note - /// - archived: Whether or not the card is archived - public init( - note: Swift.String? = nil, - archived: Swift.Bool? = nil - ) { - self.note = note - self.archived = archived + /// - name: Name of the project column + public init(name: Swift.String) { + self.name = name } public enum CodingKeys: String, CodingKey { - case note - case archived + case name } } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/requestBody/content/application\/json`. - case json(Operations.ProjectsClassicUpdateCard.Input.Body.JsonPayload) + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody/content/application\/json`. + case json(Operations.ProjectsClassicUpdateColumn.Input.Body.JsonPayload) } - public var body: Operations.ProjectsClassicUpdateCard.Input.Body? + public var body: Operations.ProjectsClassicUpdateColumn.Input.Body /// Creates a new `Input`. /// /// - Parameters: @@ -2601,9 +2316,9 @@ public enum Operations { /// - headers: /// - body: public init( - path: Operations.ProjectsClassicUpdateCard.Input.Path, - headers: Operations.ProjectsClassicUpdateCard.Input.Headers = .init(), - body: Operations.ProjectsClassicUpdateCard.Input.Body? = nil + path: Operations.ProjectsClassicUpdateColumn.Input.Path, + headers: Operations.ProjectsClassicUpdateColumn.Input.Headers = .init(), + body: Operations.ProjectsClassicUpdateColumn.Input.Body ) { self.path = path self.headers = headers @@ -2612,15 +2327,15 @@ public enum Operations { } @frozen public enum Output: Sendable, Hashable { public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/responses/200/content`. + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/responses/200/content`. @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/PATCH/responses/200/content/application\/json`. - case json(Components.Schemas.ProjectCard) + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.ProjectColumn) /// 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.ProjectCard { + public var json: Components.Schemas.ProjectColumn { get throws { switch self { case let .json(body): @@ -2630,26 +2345,26 @@ public enum Operations { } } /// Received HTTP response body - public var body: Operations.ProjectsClassicUpdateCard.Output.Ok.Body + public var body: Operations.ProjectsClassicUpdateColumn.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicUpdateCard.Output.Ok.Body) { + public init(body: Operations.ProjectsClassicUpdateColumn.Output.Ok.Body) { self.body = body } } /// Response /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/200`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/200`. /// /// HTTP response code: `200 ok`. - case ok(Operations.ProjectsClassicUpdateCard.Output.Ok) + case ok(Operations.ProjectsClassicUpdateColumn.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.ProjectsClassicUpdateCard.Output.Ok { + public var ok: Operations.ProjectsClassicUpdateColumn.Output.Ok { get throws { switch self { case let .ok(response): @@ -2664,13 +2379,13 @@ public enum Operations { } /// Not modified /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/304`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/304`. /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.NotModified) /// Not modified /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/304`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/304`. /// /// HTTP response code: `304 notModified`. public static var notModified: Self { @@ -2695,7 +2410,7 @@ public enum Operations { } /// Forbidden /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/403`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/403`. /// /// HTTP response code: `403 forbidden`. case forbidden(Components.Responses.Forbidden) @@ -2718,7 +2433,7 @@ public enum Operations { } /// Requires authentication /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/401`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/401`. /// /// HTTP response code: `401 unauthorized`. case unauthorized(Components.Responses.RequiresAuthentication) @@ -2739,52 +2454,6 @@ public enum Operations { } } } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.NotFound) - /// The associated value of the enum case if `self` is `.notFound`. - /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.NotFound { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } - } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/patch(projects-classic/update-card)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.ValidationFailedSimple) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.ValidationFailedSimple { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } /// Undocumented response. /// /// A response with a code that is not documented in the OpenAPI document. @@ -2816,52 +2485,52 @@ public enum Operations { } } } - /// Delete a project card + /// Delete a project column /// /// > [!WARNING] /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. /// - /// - Remark: HTTP `DELETE /projects/columns/cards/{card_id}`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)`. - public enum ProjectsClassicDeleteCard { - public static let id: Swift.String = "projects-classic/delete-card" + /// - Remark: HTTP `DELETE /projects/columns/{column_id}`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)`. + public enum ProjectsClassicDeleteColumn { + public static let id: Swift.String = "projects-classic/delete-column" public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/path`. + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/DELETE/path`. public struct Path: Sendable, Hashable { - /// The unique identifier of the card. + /// The unique identifier of the column. /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/path/card_id`. - public var cardId: Components.Parameters.CardId + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/DELETE/path/column_id`. + public var columnId: Components.Parameters.ColumnId /// Creates a new `Path`. /// /// - Parameters: - /// - cardId: The unique identifier of the card. - public init(cardId: Components.Parameters.CardId) { - self.cardId = cardId + /// - columnId: The unique identifier of the column. + public init(columnId: Components.Parameters.ColumnId) { + self.columnId = columnId } } - public var path: Operations.ProjectsClassicDeleteCard.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/header`. + public var path: Operations.ProjectsClassicDeleteColumn.Input.Path + /// - Remark: Generated from `#/paths/projects/columns/{column_id}/DELETE/header`. public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } - public var headers: Operations.ProjectsClassicDeleteCard.Input.Headers + public var headers: Operations.ProjectsClassicDeleteColumn.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: public init( - path: Operations.ProjectsClassicDeleteCard.Input.Path, - headers: Operations.ProjectsClassicDeleteCard.Input.Headers = .init() + path: Operations.ProjectsClassicDeleteColumn.Input.Path, + headers: Operations.ProjectsClassicDeleteColumn.Input.Headers = .init() ) { self.path = path self.headers = headers @@ -2874,13 +2543,13 @@ public enum Operations { } /// Response /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/204`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/204`. /// /// HTTP response code: `204 noContent`. - case noContent(Operations.ProjectsClassicDeleteCard.Output.NoContent) + case noContent(Operations.ProjectsClassicDeleteColumn.Output.NoContent) /// Response /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/204`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/204`. /// /// HTTP response code: `204 noContent`. public static var noContent: Self { @@ -2890,7 +2559,7 @@ public enum Operations { /// /// - Throws: An error if `self` is not `.noContent`. /// - SeeAlso: `.noContent`. - public var noContent: Operations.ProjectsClassicDeleteCard.Output.NoContent { + public var noContent: Operations.ProjectsClassicDeleteColumn.Output.NoContent { get throws { switch self { case let .noContent(response): @@ -2905,13 +2574,13 @@ public enum Operations { } /// Not modified /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/304`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/304`. /// /// HTTP response code: `304 notModified`. case notModified(Components.Responses.NotModified) /// Not modified /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/304`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/304`. /// /// HTTP response code: `304 notModified`. public static var notModified: Self { @@ -2934,74 +2603,17 @@ public enum Operations { } } } - public struct Forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/responses/403/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/responses/403/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/responses/403/content/json/message`. - public var message: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/responses/403/content/json/documentation_url`. - public var documentationUrl: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/responses/403/content/json/errors`. - public var errors: [Swift.String]? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - message: - /// - documentationUrl: - /// - errors: - public init( - message: Swift.String? = nil, - documentationUrl: Swift.String? = nil, - errors: [Swift.String]? = nil - ) { - self.message = message - self.documentationUrl = documentationUrl - self.errors = errors - } - public enum CodingKeys: String, CodingKey { - case message - case documentationUrl = "documentation_url" - case errors - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/DELETE/responses/403/content/application\/json`. - case json(Operations.ProjectsClassicDeleteCard.Output.Forbidden.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.ProjectsClassicDeleteCard.Output.Forbidden.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicDeleteCard.Output.Forbidden.Body - /// Creates a new `Forbidden`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicDeleteCard.Output.Forbidden.Body) { - self.body = body - } - } /// Forbidden /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/403`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/403`. /// /// HTTP response code: `403 forbidden`. - case forbidden(Operations.ProjectsClassicDeleteCard.Output.Forbidden) + case forbidden(Components.Responses.Forbidden) /// The associated value of the enum case if `self` is `.forbidden`. /// /// - Throws: An error if `self` is not `.forbidden`. /// - SeeAlso: `.forbidden`. - public var forbidden: Operations.ProjectsClassicDeleteCard.Output.Forbidden { + public var forbidden: Components.Responses.Forbidden { get throws { switch self { case let .forbidden(response): @@ -3016,7 +2628,7 @@ public enum Operations { } /// Requires authentication /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/401`. + /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/401`. /// /// HTTP response code: `401 unauthorized`. case unauthorized(Components.Responses.RequiresAuthentication) @@ -3037,1944 +2649,6 @@ public enum Operations { } } } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/delete(projects-classic/delete-card)/responses/404`. - /// - /// HTTP response code: `404 notFound`. - case notFound(Components.Responses.NotFound) - /// The associated value of the enum case if `self` is `.notFound`. - /// - /// - Throws: An error if `self` is not `.notFound`. - /// - SeeAlso: `.notFound`. - public var notFound: Components.Responses.NotFound { - get throws { - switch self { - case let .notFound(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notFound", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Move a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/cards/{card_id}/moves`. - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)`. - public enum ProjectsClassicMoveCard { - public static let id: Swift.String = "projects-classic/move-card" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/path`. - public struct Path: Sendable, Hashable { - /// The unique identifier of the card. - /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/path/card_id`. - public var cardId: Components.Parameters.CardId - /// Creates a new `Path`. - /// - /// - Parameters: - /// - cardId: The unique identifier of the card. - public init(cardId: Components.Parameters.CardId) { - self.cardId = cardId - } - } - public var path: Operations.ProjectsClassicMoveCard.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.ProjectsClassicMoveCard.Input.Headers - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. - /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/requestBody/json/position`. - public var position: Swift.String - /// The unique identifier of the column the card should be moved to - /// - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/requestBody/json/column_id`. - public var columnId: Swift.Int? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - position: The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. - /// - columnId: The unique identifier of the column the card should be moved to - public init( - position: Swift.String, - columnId: Swift.Int? = nil - ) { - self.position = position - self.columnId = columnId - } - public enum CodingKeys: String, CodingKey { - case position - case columnId = "column_id" - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/requestBody/content/application\/json`. - case json(Operations.ProjectsClassicMoveCard.Input.Body.JsonPayload) - } - public var body: Operations.ProjectsClassicMoveCard.Input.Body - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - /// - body: - public init( - path: Operations.ProjectsClassicMoveCard.Input.Path, - headers: Operations.ProjectsClassicMoveCard.Input.Headers = .init(), - body: Operations.ProjectsClassicMoveCard.Input.Body - ) { - self.path = path - self.headers = headers - self.body = body - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/201/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/201/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// Creates a new `JsonPayload`. - public init() {} - public init(from decoder: any Decoder) throws { - try decoder.ensureNoAdditionalProperties(knownKeys: []) - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/201/content/application\/json`. - case json(Operations.ProjectsClassicMoveCard.Output.Created.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.ProjectsClassicMoveCard.Output.Created.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicMoveCard.Output.Created.Body - /// Creates a new `Created`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicMoveCard.Output.Created.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/201`. - /// - /// HTTP response code: `201 created`. - case created(Operations.ProjectsClassicMoveCard.Output.Created) - /// The associated value of the enum case if `self` is `.created`. - /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.ProjectsClassicMoveCard.Output.Created { - get throws { - switch self { - case let .created(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "created", - response: self - ) - } - } - } - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - case notModified(Components.Responses.NotModified) - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - public static var notModified: Self { - .notModified(.init()) - } - /// The associated value of the enum case if `self` is `.notModified`. - /// - /// - Throws: An error if `self` is not `.notModified`. - /// - SeeAlso: `.notModified`. - public var notModified: Components.Responses.NotModified { - get throws { - switch self { - case let .notModified(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notModified", - response: self - ) - } - } - } - public struct Forbidden: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/message`. - public var message: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/documentation_url`. - public var documentationUrl: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/ErrorsPayload`. - public struct ErrorsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/ErrorsPayload/code`. - public var code: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/ErrorsPayload/message`. - public var message: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/ErrorsPayload/resource`. - public var resource: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/ErrorsPayload/field`. - public var field: Swift.String? - /// Creates a new `ErrorsPayloadPayload`. - /// - /// - Parameters: - /// - code: - /// - message: - /// - resource: - /// - field: - public init( - code: Swift.String? = nil, - message: Swift.String? = nil, - resource: Swift.String? = nil, - field: Swift.String? = nil - ) { - self.code = code - self.message = message - self.resource = resource - self.field = field - } - public enum CodingKeys: String, CodingKey { - case code - case message - case resource - case field - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/errors`. - public typealias ErrorsPayload = [Operations.ProjectsClassicMoveCard.Output.Forbidden.Body.JsonPayload.ErrorsPayloadPayload] - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/json/errors`. - public var errors: Operations.ProjectsClassicMoveCard.Output.Forbidden.Body.JsonPayload.ErrorsPayload? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - message: - /// - documentationUrl: - /// - errors: - public init( - message: Swift.String? = nil, - documentationUrl: Swift.String? = nil, - errors: Operations.ProjectsClassicMoveCard.Output.Forbidden.Body.JsonPayload.ErrorsPayload? = nil - ) { - self.message = message - self.documentationUrl = documentationUrl - self.errors = errors - } - public enum CodingKeys: String, CodingKey { - case message - case documentationUrl = "documentation_url" - case errors - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/403/content/application\/json`. - case json(Operations.ProjectsClassicMoveCard.Output.Forbidden.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.ProjectsClassicMoveCard.Output.Forbidden.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicMoveCard.Output.Forbidden.Body - /// Creates a new `Forbidden`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicMoveCard.Output.Forbidden.Body) { - self.body = body - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Operations.ProjectsClassicMoveCard.Output.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Operations.ProjectsClassicMoveCard.Output.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/code`. - public var code: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/message`. - public var message: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/documentation_url`. - public var documentationUrl: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/ErrorsPayload`. - public struct ErrorsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/ErrorsPayload/code`. - public var code: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/ErrorsPayload/message`. - public var message: Swift.String? - /// Creates a new `ErrorsPayloadPayload`. - /// - /// - Parameters: - /// - code: - /// - message: - public init( - code: Swift.String? = nil, - message: Swift.String? = nil - ) { - self.code = code - self.message = message - } - public enum CodingKeys: String, CodingKey { - case code - case message - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/errors`. - public typealias ErrorsPayload = [Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body.JsonPayload.ErrorsPayloadPayload] - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/json/errors`. - public var errors: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body.JsonPayload.ErrorsPayload? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - code: - /// - message: - /// - documentationUrl: - /// - errors: - public init( - code: Swift.String? = nil, - message: Swift.String? = nil, - documentationUrl: Swift.String? = nil, - errors: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body.JsonPayload.ErrorsPayload? = nil - ) { - self.code = code - self.message = message - self.documentationUrl = documentationUrl - self.errors = errors - } - public enum CodingKeys: String, CodingKey { - case code - case message - case documentationUrl = "documentation_url" - case errors - } - } - /// - Remark: Generated from `#/paths/projects/columns/cards/{card_id}/moves/POST/responses/503/content/application\/json`. - case json(Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body - /// Creates a new `ServiceUnavailable`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/503`. - /// - /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ProjectsClassicMoveCard.Output.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: Operations.ProjectsClassicMoveCard.Output.ServiceUnavailable { - get throws { - switch self { - case let .serviceUnavailable(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "serviceUnavailable", - response: self - ) - } - } - } - /// Validation failed, or the endpoint has been spammed. - /// - /// - Remark: Generated from `#/paths//projects/columns/cards/{card_id}/moves/post(projects-classic/move-card)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Components.Responses.ValidationFailed) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Components.Responses.ValidationFailed { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Get a project column - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/{column_id}`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)`. - public enum ProjectsClassicGetColumn { - public static let id: Swift.String = "projects-classic/get-column" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/path`. - public struct Path: Sendable, Hashable { - /// The unique identifier of the column. - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/path/column_id`. - public var columnId: Components.Parameters.ColumnId - /// Creates a new `Path`. - /// - /// - Parameters: - /// - columnId: The unique identifier of the column. - public init(columnId: Components.Parameters.ColumnId) { - self.columnId = columnId - } - } - public var path: Operations.ProjectsClassicGetColumn.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.ProjectsClassicGetColumn.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.ProjectsClassicGetColumn.Input.Path, - headers: Operations.ProjectsClassicGetColumn.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/GET/responses/200/content/application\/json`. - case json(Components.Schemas.ProjectColumn) - /// 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.ProjectColumn { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicGetColumn.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicGetColumn.Output.Ok.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.ProjectsClassicGetColumn.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.ProjectsClassicGetColumn.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } - } - } - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - case notModified(Components.Responses.NotModified) - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - public static var notModified: Self { - .notModified(.init()) - } - /// The associated value of the enum case if `self` is `.notModified`. - /// - /// - Throws: An error if `self` is not `.notModified`. - /// - SeeAlso: `.notModified`. - public var notModified: Components.Responses.NotModified { - get throws { - switch self { - case let .notModified(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notModified", - response: self - ) - } - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } - /// Resource not found - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/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 - ) - } - } - } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/get(projects-classic/get-column)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Update an existing project column - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `PATCH /projects/columns/{column_id}`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)`. - public enum ProjectsClassicUpdateColumn { - public static let id: Swift.String = "projects-classic/update-column" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/path`. - public struct Path: Sendable, Hashable { - /// The unique identifier of the column. - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/path/column_id`. - public var columnId: Components.Parameters.ColumnId - /// Creates a new `Path`. - /// - /// - Parameters: - /// - columnId: The unique identifier of the column. - public init(columnId: Components.Parameters.ColumnId) { - self.columnId = columnId - } - } - public var path: Operations.ProjectsClassicUpdateColumn.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.ProjectsClassicUpdateColumn.Input.Headers - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// Name of the project column - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody/json/name`. - public var name: Swift.String - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - name: Name of the project column - public init(name: Swift.String) { - self.name = name - } - public enum CodingKeys: String, CodingKey { - case name - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/requestBody/content/application\/json`. - case json(Operations.ProjectsClassicUpdateColumn.Input.Body.JsonPayload) - } - public var body: Operations.ProjectsClassicUpdateColumn.Input.Body - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - /// - body: - public init( - path: Operations.ProjectsClassicUpdateColumn.Input.Path, - headers: Operations.ProjectsClassicUpdateColumn.Input.Headers = .init(), - body: Operations.ProjectsClassicUpdateColumn.Input.Body - ) { - self.path = path - self.headers = headers - self.body = body - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Ok: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/PATCH/responses/200/content/application\/json`. - case json(Components.Schemas.ProjectColumn) - /// 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.ProjectColumn { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicUpdateColumn.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicUpdateColumn.Output.Ok.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.ProjectsClassicUpdateColumn.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.ProjectsClassicUpdateColumn.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } - } - } - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - case notModified(Components.Responses.NotModified) - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - public static var notModified: Self { - .notModified(.init()) - } - /// The associated value of the enum case if `self` is `.notModified`. - /// - /// - Throws: An error if `self` is not `.notModified`. - /// - SeeAlso: `.notModified`. - public var notModified: Components.Responses.NotModified { - get throws { - switch self { - case let .notModified(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notModified", - response: self - ) - } - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/patch(projects-classic/update-column)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Delete a project column - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `DELETE /projects/columns/{column_id}`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)`. - public enum ProjectsClassicDeleteColumn { - public static let id: Swift.String = "projects-classic/delete-column" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/DELETE/path`. - public struct Path: Sendable, Hashable { - /// The unique identifier of the column. - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/DELETE/path/column_id`. - public var columnId: Components.Parameters.ColumnId - /// Creates a new `Path`. - /// - /// - Parameters: - /// - columnId: The unique identifier of the column. - public init(columnId: Components.Parameters.ColumnId) { - self.columnId = columnId - } - } - public var path: Operations.ProjectsClassicDeleteColumn.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/DELETE/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.ProjectsClassicDeleteColumn.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - public init( - path: Operations.ProjectsClassicDeleteColumn.Input.Path, - headers: Operations.ProjectsClassicDeleteColumn.Input.Headers = .init() - ) { - self.path = path - self.headers = headers - } - } - @frozen public enum Output: Sendable, Hashable { - public struct NoContent: Sendable, Hashable { - /// Creates a new `NoContent`. - public init() {} - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - case noContent(Operations.ProjectsClassicDeleteColumn.Output.NoContent) - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/204`. - /// - /// HTTP response code: `204 noContent`. - public static var noContent: Self { - .noContent(.init()) - } - /// The associated value of the enum case if `self` is `.noContent`. - /// - /// - Throws: An error if `self` is not `.noContent`. - /// - SeeAlso: `.noContent`. - public var noContent: Operations.ProjectsClassicDeleteColumn.Output.NoContent { - get throws { - switch self { - case let .noContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "noContent", - response: self - ) - } - } - } - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - case notModified(Components.Responses.NotModified) - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - public static var notModified: Self { - .notModified(.init()) - } - /// The associated value of the enum case if `self` is `.notModified`. - /// - /// - Throws: An error if `self` is not `.notModified`. - /// - SeeAlso: `.notModified`. - public var notModified: Components.Responses.NotModified { - get throws { - switch self { - case let .notModified(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notModified", - response: self - ) - } - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/delete(projects-classic/delete-column)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// List project cards - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `GET /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)`. - public enum ProjectsClassicListCards { - public static let id: Swift.String = "projects-classic/list-cards" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/path`. - public struct Path: Sendable, Hashable { - /// The unique identifier of the column. - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/path/column_id`. - public var columnId: Components.Parameters.ColumnId - /// Creates a new `Path`. - /// - /// - Parameters: - /// - columnId: The unique identifier of the column. - public init(columnId: Components.Parameters.ColumnId) { - self.columnId = columnId - } - } - public var path: Operations.ProjectsClassicListCards.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/query`. - public struct Query: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/query/archived_state`. - @frozen public enum ArchivedStatePayload: String, Codable, Hashable, Sendable, CaseIterable { - case all = "all" - case archived = "archived" - case notArchived = "not_archived" - } - /// Filters the project cards that are returned by the card's state. - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/query/archived_state`. - public var archivedState: Operations.ProjectsClassicListCards.Input.Query.ArchivedStatePayload? - /// 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/projects/columns/{column_id}/cards/GET/query/per_page`. - public var perPage: Components.Parameters.PerPage? - /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/query/page`. - public var page: Components.Parameters.Page? - /// Creates a new `Query`. - /// - /// - Parameters: - /// - archivedState: Filters the project cards that are returned by the card's state. - /// - perPage: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." - /// - page: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." - public init( - archivedState: Operations.ProjectsClassicListCards.Input.Query.ArchivedStatePayload? = nil, - perPage: Components.Parameters.PerPage? = nil, - page: Components.Parameters.Page? = nil - ) { - self.archivedState = archivedState - self.perPage = perPage - self.page = page - } - } - public var query: Operations.ProjectsClassicListCards.Input.Query - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/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.ProjectsClassicListCards.Input.Headers - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - query: - /// - headers: - public init( - path: Operations.ProjectsClassicListCards.Input.Path, - query: Operations.ProjectsClassicListCards.Input.Query = .init(), - headers: Operations.ProjectsClassicListCards.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/projects/columns/{column_id}/cards/GET/responses/200/headers`. - public struct Headers: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/responses/200/headers/Link`. - public var link: Components.Headers.Link? - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - link: - public init(link: Components.Headers.Link? = nil) { - self.link = link - } - } - /// Received HTTP response headers - public var headers: Operations.ProjectsClassicListCards.Output.Ok.Headers - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/responses/200/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/GET/responses/200/content/application\/json`. - case json([Components.Schemas.ProjectCard]) - /// 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.ProjectCard] { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicListCards.Output.Ok.Body - /// Creates a new `Ok`. - /// - /// - Parameters: - /// - headers: Received HTTP response headers - /// - body: Received HTTP response body - public init( - headers: Operations.ProjectsClassicListCards.Output.Ok.Headers = .init(), - body: Operations.ProjectsClassicListCards.Output.Ok.Body - ) { - self.headers = headers - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)/responses/200`. - /// - /// HTTP response code: `200 ok`. - case ok(Operations.ProjectsClassicListCards.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.ProjectsClassicListCards.Output.Ok { - get throws { - switch self { - case let .ok(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "ok", - response: self - ) - } - } - } - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - case notModified(Components.Responses.NotModified) - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - public static var notModified: Self { - .notModified(.init()) - } - /// The associated value of the enum case if `self` is `.notModified`. - /// - /// - Throws: An error if `self` is not `.notModified`. - /// - SeeAlso: `.notModified`. - public var notModified: Components.Responses.NotModified { - get throws { - switch self { - case let .notModified(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notModified", - response: self - ) - } - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/get(projects-classic/list-cards)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - /// Undocumented response. - /// - /// A response with a code that is not documented in the OpenAPI document. - case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) - } - @frozen public enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - public init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - public var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - public static var allCases: [Self] { - [ - .json - ] - } - } - } - /// Create a project card - /// - /// > [!WARNING] - /// > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. - /// > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. - /// - /// - Remark: HTTP `POST /projects/columns/{column_id}/cards`. - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)`. - public enum ProjectsClassicCreateCard { - public static let id: Swift.String = "projects-classic/create-card" - public struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/path`. - public struct Path: Sendable, Hashable { - /// The unique identifier of the column. - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/path/column_id`. - public var columnId: Components.Parameters.ColumnId - /// Creates a new `Path`. - /// - /// - Parameters: - /// - columnId: The unique identifier of the column. - public init(columnId: Components.Parameters.ColumnId) { - self.columnId = columnId - } - } - public var path: Operations.ProjectsClassicCreateCard.Input.Path - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/header`. - public struct Headers: Sendable, Hashable { - public var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - public var headers: Operations.ProjectsClassicCreateCard.Input.Headers - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json`. - @frozen public enum JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case1`. - public struct Case1Payload: Codable, Hashable, Sendable { - /// The project card's note - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case1/note`. - public var note: Swift.String? - /// Creates a new `Case1Payload`. - /// - /// - Parameters: - /// - note: The project card's note - public init(note: Swift.String? = nil) { - self.note = note - } - public enum CodingKeys: String, CodingKey { - case note - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case1`. - case case1(Operations.ProjectsClassicCreateCard.Input.Body.JsonPayload.Case1Payload) - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case2`. - public struct Case2Payload: Codable, Hashable, Sendable { - /// The unique identifier of the content associated with the card - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case2/content_id`. - public var contentId: Swift.Int - /// The piece of content associated with the card - /// - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case2/content_type`. - public var contentType: Swift.String - /// Creates a new `Case2Payload`. - /// - /// - Parameters: - /// - contentId: The unique identifier of the content associated with the card - /// - contentType: The piece of content associated with the card - public init( - contentId: Swift.Int, - contentType: Swift.String - ) { - self.contentId = contentId - self.contentType = contentType - } - public enum CodingKeys: String, CodingKey { - case contentId = "content_id" - case contentType = "content_type" - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/json/case2`. - case case2(Operations.ProjectsClassicCreateCard.Input.Body.JsonPayload.Case2Payload) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .case2(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try value.encode(to: encoder) - case let .case2(value): - try value.encode(to: encoder) - } - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/requestBody/content/application\/json`. - case json(Operations.ProjectsClassicCreateCard.Input.Body.JsonPayload) - } - public var body: Operations.ProjectsClassicCreateCard.Input.Body - /// Creates a new `Input`. - /// - /// - Parameters: - /// - path: - /// - headers: - /// - body: - public init( - path: Operations.ProjectsClassicCreateCard.Input.Path, - headers: Operations.ProjectsClassicCreateCard.Input.Headers = .init(), - body: Operations.ProjectsClassicCreateCard.Input.Body - ) { - self.path = path - self.headers = headers - self.body = body - } - } - @frozen public enum Output: Sendable, Hashable { - public struct Created: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/201/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/201/content/application\/json`. - case json(Components.Schemas.ProjectCard) - /// 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.ProjectCard { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicCreateCard.Output.Created.Body - /// Creates a new `Created`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicCreateCard.Output.Created.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/201`. - /// - /// HTTP response code: `201 created`. - case created(Operations.ProjectsClassicCreateCard.Output.Created) - /// The associated value of the enum case if `self` is `.created`. - /// - /// - Throws: An error if `self` is not `.created`. - /// - SeeAlso: `.created`. - public var created: Operations.ProjectsClassicCreateCard.Output.Created { - get throws { - switch self { - case let .created(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "created", - response: self - ) - } - } - } - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - case notModified(Components.Responses.NotModified) - /// Not modified - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/304`. - /// - /// HTTP response code: `304 notModified`. - public static var notModified: Self { - .notModified(.init()) - } - /// The associated value of the enum case if `self` is `.notModified`. - /// - /// - Throws: An error if `self` is not `.notModified`. - /// - SeeAlso: `.notModified`. - public var notModified: Components.Responses.NotModified { - get throws { - switch self { - case let .notModified(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "notModified", - response: self - ) - } - } - } - /// Forbidden - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/403`. - /// - /// HTTP response code: `403 forbidden`. - case forbidden(Components.Responses.Forbidden) - /// The associated value of the enum case if `self` is `.forbidden`. - /// - /// - Throws: An error if `self` is not `.forbidden`. - /// - SeeAlso: `.forbidden`. - public var forbidden: Components.Responses.Forbidden { - get throws { - switch self { - case let .forbidden(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "forbidden", - response: self - ) - } - } - } - /// Requires authentication - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/401`. - /// - /// HTTP response code: `401 unauthorized`. - case unauthorized(Components.Responses.RequiresAuthentication) - /// The associated value of the enum case if `self` is `.unauthorized`. - /// - /// - Throws: An error if `self` is not `.unauthorized`. - /// - SeeAlso: `.unauthorized`. - public var unauthorized: Components.Responses.RequiresAuthentication { - get throws { - switch self { - case let .unauthorized(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unauthorized", - response: self - ) - } - } - } - public struct UnprocessableContent: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/422/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/422/content/json`. - @frozen public enum JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/422/content/json/case1`. - case ValidationError(Components.Schemas.ValidationError) - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/422/content/json/case2`. - case ValidationErrorSimple(Components.Schemas.ValidationErrorSimple) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .ValidationError(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .ValidationErrorSimple(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .ValidationError(value): - try value.encode(to: encoder) - case let .ValidationErrorSimple(value): - try value.encode(to: encoder) - } - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/422/content/application\/json`. - case json(Operations.ProjectsClassicCreateCard.Output.UnprocessableContent.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.ProjectsClassicCreateCard.Output.UnprocessableContent.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicCreateCard.Output.UnprocessableContent.Body - /// Creates a new `UnprocessableContent`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicCreateCard.Output.UnprocessableContent.Body) { - self.body = body - } - } - /// Validation failed - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/422`. - /// - /// HTTP response code: `422 unprocessableContent`. - case unprocessableContent(Operations.ProjectsClassicCreateCard.Output.UnprocessableContent) - /// The associated value of the enum case if `self` is `.unprocessableContent`. - /// - /// - Throws: An error if `self` is not `.unprocessableContent`. - /// - SeeAlso: `.unprocessableContent`. - public var unprocessableContent: Operations.ProjectsClassicCreateCard.Output.UnprocessableContent { - get throws { - switch self { - case let .unprocessableContent(response): - return response - default: - try throwUnexpectedResponseStatus( - expectedStatus: "unprocessableContent", - response: self - ) - } - } - } - public struct ServiceUnavailable: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content`. - @frozen public enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json`. - public struct JsonPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/code`. - public var code: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/message`. - public var message: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/documentation_url`. - public var documentationUrl: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/ErrorsPayload`. - public struct ErrorsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/ErrorsPayload/code`. - public var code: Swift.String? - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/ErrorsPayload/message`. - public var message: Swift.String? - /// Creates a new `ErrorsPayloadPayload`. - /// - /// - Parameters: - /// - code: - /// - message: - public init( - code: Swift.String? = nil, - message: Swift.String? = nil - ) { - self.code = code - self.message = message - } - public enum CodingKeys: String, CodingKey { - case code - case message - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/errors`. - public typealias ErrorsPayload = [Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body.JsonPayload.ErrorsPayloadPayload] - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/json/errors`. - public var errors: Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body.JsonPayload.ErrorsPayload? - /// Creates a new `JsonPayload`. - /// - /// - Parameters: - /// - code: - /// - message: - /// - documentationUrl: - /// - errors: - public init( - code: Swift.String? = nil, - message: Swift.String? = nil, - documentationUrl: Swift.String? = nil, - errors: Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body.JsonPayload.ErrorsPayload? = nil - ) { - self.code = code - self.message = message - self.documentationUrl = documentationUrl - self.errors = errors - } - public enum CodingKeys: String, CodingKey { - case code - case message - case documentationUrl = "documentation_url" - case errors - } - } - /// - Remark: Generated from `#/paths/projects/columns/{column_id}/cards/POST/responses/503/content/application\/json`. - case json(Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body.JsonPayload) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - public var json: Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body.JsonPayload { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - public var body: Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body - /// Creates a new `ServiceUnavailable`. - /// - /// - Parameters: - /// - body: Received HTTP response body - public init(body: Operations.ProjectsClassicCreateCard.Output.ServiceUnavailable.Body) { - self.body = body - } - } - /// Response - /// - /// - Remark: Generated from `#/paths//projects/columns/{column_id}/cards/post(projects-classic/create-card)/responses/503`. - /// - /// HTTP response code: `503 serviceUnavailable`. - case serviceUnavailable(Operations.ProjectsClassicCreateCard.Output.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: Operations.ProjectsClassicCreateCard.Output.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. diff --git a/Sources/repos/Client.swift b/Sources/repos/Client.swift index fa57f81fb2..2eeb2872ec 100644 --- a/Sources/repos/Client.swift +++ b/Sources/repos/Client.swift @@ -1115,7 +1115,8 @@ public struct Client: APIProtocol { /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// /// > [!NOTE] - /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. diff --git a/Sources/repos/Types.swift b/Sources/repos/Types.swift index 780a002b24..1352975e9e 100644 --- a/Sources/repos/Types.swift +++ b/Sources/repos/Types.swift @@ -89,7 +89,8 @@ public protocol APIProtocol: Sendable { /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// /// > [!NOTE] - /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -2276,7 +2277,8 @@ extension APIProtocol { /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// /// > [!NOTE] - /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. @@ -25899,7 +25901,8 @@ public enum Operations { /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. /// /// > [!NOTE] - /// > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions. /// /// - Remark: HTTP `GET /repos/{owner}/{repo}`. /// - Remark: Generated from `#/paths//repos/{owner}/{repo}/get(repos/get)`. diff --git a/Sources/search/Client.swift b/Sources/search/Client.swift index b3adc61e39..95c2694c62 100644 --- a/Sources/search/Client.swift +++ b/Sources/search/Client.swift @@ -331,7 +331,7 @@ public struct Client: APIProtocol { /// Search issues and pull requests /// /// > [!WARNING] - /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. + /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025. /// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). /// /// - Remark: HTTP `GET /search/issues`. diff --git a/Sources/search/Types.swift b/Sources/search/Types.swift index 5e9bf75b50..d3d33af1bb 100644 --- a/Sources/search/Types.swift +++ b/Sources/search/Types.swift @@ -54,7 +54,7 @@ public protocol APIProtocol: Sendable { /// Search issues and pull requests /// /// > [!WARNING] - /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. + /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025. /// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). /// /// - Remark: HTTP `GET /search/issues`. @@ -186,7 +186,7 @@ extension APIProtocol { /// Search issues and pull requests /// /// > [!WARNING] - /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. + /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025. /// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). /// /// - Remark: HTTP `GET /search/issues`. @@ -5975,7 +5975,7 @@ public enum Operations { /// Search issues and pull requests /// /// > [!WARNING] - /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. + /// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025. /// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). /// /// - Remark: HTTP `GET /search/issues`. diff --git a/Sources/security-advisories/Types.swift b/Sources/security-advisories/Types.swift index d02b33642d..be06d58ef2 100644 --- a/Sources/security-advisories/Types.swift +++ b/Sources/security-advisories/Types.swift @@ -6672,7 +6672,7 @@ public enum Operations { /// If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified. /// If the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages. /// - /// Example: `affects=package1,package2@1.0.0,package3@^2.0.0` or `affects[]=package1&affects[]=package2@1.0.0` + /// Example: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0` /// /// - Remark: Generated from `#/paths/advisories/GET/query/affects`. public var affects: Operations.SecurityAdvisoriesListGlobalAdvisories.Input.Query.AffectsPayload? diff --git a/Submodule/github/rest-api-description b/Submodule/github/rest-api-description index 883ec926b6..f0dc156505 160000 --- a/Submodule/github/rest-api-description +++ b/Submodule/github/rest-api-description @@ -1 +1 @@ -Subproject commit 883ec926b6621250deaa3de639e53a42967d2639 +Subproject commit f0dc156505ef3ea9ae0fd2f227aca5642c465e4f