Skip to content
7 changes: 0 additions & 7 deletions Sources/apps/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@ public struct Client: APIProtocol {
name: "cursor",
value: input.query.cursor
)
try converter.setQueryItemAsURI(
in: &request,
style: .form,
explode: true,
name: "redelivery",
value: input.query.redelivery
)
converter.setAcceptHeader(
in: &request.headerFields,
contentTypes: input.headers.accept
Expand Down
7 changes: 1 addition & 6 deletions Sources/apps/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5728,22 +5728,17 @@ public enum Operations {
///
/// - Remark: Generated from `#/paths/app/hook/deliveries/GET/query/cursor`.
public var cursor: Components.Parameters.cursor?
/// - Remark: Generated from `#/paths/app/hook/deliveries/GET/query/redelivery`.
public var redelivery: Swift.Bool?
/// Creates a new `Query`.
///
/// - Parameters:
/// - per_page: 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)."
/// - cursor: Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors.
/// - redelivery:
public init(
per_page: Components.Parameters.per_hyphen_page? = nil,
cursor: Components.Parameters.cursor? = nil,
redelivery: Swift.Bool? = nil
cursor: Components.Parameters.cursor? = nil
) {
self.per_page = per_page
self.cursor = cursor
self.redelivery = redelivery
}
}
public var query: Operations.apps_sol_list_hyphen_webhook_hyphen_deliveries.Input.Query
Expand Down
4 changes: 2 additions & 2 deletions Sources/checks/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ public enum Components {
/// - Remark: Generated from `#/components/schemas/check-suite`.
public struct check_hyphen_suite: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/check-suite/id`.
public var id: Swift.Int
public var id: Swift.Int64
/// - Remark: Generated from `#/components/schemas/check-suite/node_id`.
public var node_id: Swift.String
/// - Remark: Generated from `#/components/schemas/check-suite/head_branch`.
Expand Down Expand Up @@ -2571,7 +2571,7 @@ public enum Components {
/// - rerequestable:
/// - runs_rerequestable:
public init(
id: Swift.Int,
id: Swift.Int64,
node_id: Swift.String,
head_branch: Swift.String? = nil,
head_sha: Swift.String,
Expand Down
118 changes: 116 additions & 2 deletions Sources/code-scanning/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ public struct Client: APIProtocol {
///
/// Lists the CodeQL databases that are available in a repository.
///
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`.
Expand Down Expand Up @@ -1632,7 +1632,7 @@ public struct Client: APIProtocol {
/// your HTTP client is configured to follow redirects or use the `Location` header
/// to make a second request to get the redirect URL.
///
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`.
Expand Down Expand Up @@ -1764,6 +1764,120 @@ public struct Client: APIProtocol {
}
)
}
/// Delete a CodeQL database
///
/// Deletes a CodeQL database for a language in a repository.
///
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
///
/// - Remark: HTTP `DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)`.
public func code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database(_ input: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input) async throws -> Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output {
try await client.send(
input: input,
forOperation: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/repos/{}/{}/code-scanning/codeql/databases/{}",
parameters: [
input.path.owner,
input.path.repo,
input.path.language
]
)
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 403:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Components.Responses.code_scanning_forbidden_write.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
"application/json"
]
)
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Components.Schemas.basic_hyphen_error.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.not_found.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
"application/json"
]
)
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Components.Schemas.basic_hyphen_error.self,
from: responseBody,
transforming: { value in
.json(value)
}
)
default:
preconditionFailure("bestContentType chose an invalid content type.")
}
return .notFound(.init(body: body))
case 503:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Components.Responses.service_unavailable.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
"application/json"
]
)
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Components.Responses.service_unavailable.Body.jsonPayload.self,
from: responseBody,
transforming: { value in
.json(value)
}
)
default:
preconditionFailure("bestContentType chose an invalid content type.")
}
return .serviceUnavailable(.init(body: body))
default:
return .undocumented(
statusCode: response.status.code,
.init(
headerFields: response.headerFields,
body: responseBody
)
)
}
}
)
}
/// Create a CodeQL variant analysis
///
/// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.
Expand Down
Loading