ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.285.0

This commit is contained in:
speakeasybot
2024-05-08 18:15:36 +00:00
parent 1c0482d57f
commit 3d9c4e9182
24 changed files with 717 additions and 1611 deletions

View File

@@ -55,15 +55,6 @@ class _LibraryAPI: LibraryAPI {
)
}
public func getLibraryItems(request: Operations.GetLibraryItemsRequest) async throws -> Response<Operations.GetLibraryItemsResponse> {
return try await client.makeRequest(
configureRequest: { configuration in
try configureGetLibraryItemsRequest(with: configuration, request: request)
},
handleResponse: handleGetLibraryItemsResponse
)
}
public func refreshLibrary(request: Operations.RefreshLibraryRequest) async throws -> Response<Operations.RefreshLibraryResponse> {
return try await client.makeRequest(
configureRequest: { configuration in
@@ -147,13 +138,6 @@ private func configureDeleteLibraryRequest(with configuration: URLRequestConfigu
configuration.telemetryHeader = .userAgent
}
private func configureGetLibraryItemsRequest(with configuration: URLRequestConfiguration, request: Operations.GetLibraryItemsRequest) throws {
configuration.path = "/library/sections/{sectionId}/{tag}"
configuration.method = .get
configuration.pathParameterSerializable = request
configuration.telemetryHeader = .userAgent
}
private func configureRefreshLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.RefreshLibraryRequest) throws {
configuration.path = "/library/sections/{sectionId}/refresh"
configuration.method = .get
@@ -305,22 +289,6 @@ private func handleDeleteLibraryResponse(response: Client.APIResponse) throws ->
return .empty
}
private func handleGetLibraryItemsResponse(response: Client.APIResponse) throws -> Operations.GetLibraryItemsResponse {
let httpResponse = response.httpResponse
if httpResponse.statusCode == 200 {
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
do {
return .object(try JSONDecoder().decode(Operations.GetLibraryItemsResponseBody.self, from: data))
} catch {
throw ResponseHandlerError.failedToDecodeJSON(error)
}
}
}
return .empty
}
private func handleRefreshLibraryResponse(response: Client.APIResponse) throws -> Operations.RefreshLibraryResponse {
let httpResponse = response.httpResponse