ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6

This commit is contained in:
speakeasybot
2025-02-11 00:09:23 +00:00
parent e6b7aa3eba
commit beb0de09ae
103 changed files with 3110 additions and 400 deletions

View File

@@ -64,6 +64,15 @@ class _LibraryAPI: LibraryAPI {
)
}
public func getAllMediaLibrary(request: Operations.GetAllMediaLibraryRequest) async throws -> Response<Operations.GetAllMediaLibraryResponse> {
return try await client.makeRequest(
configureRequest: { configuration in
try configureGetAllMediaLibraryRequest(with: configuration, request: request)
},
handleResponse: handleGetAllMediaLibraryResponse
)
}
public func getRefreshLibraryMetadata(request: Operations.GetRefreshLibraryMetadataRequest) async throws -> Response<Operations.GetRefreshLibraryMetadataResponse> {
return try await client.makeRequest(
configureRequest: { configuration in
@@ -201,6 +210,14 @@ private func configureGetLibraryItemsRequest(with configuration: URLRequestConfi
configuration.telemetryHeader = .userAgent
}
private func configureGetAllMediaLibraryRequest(with configuration: URLRequestConfiguration, request: Operations.GetAllMediaLibraryRequest) throws {
configuration.path = "/library/sections/{sectionKey}/all"
configuration.method = .get
configuration.pathParameterSerializable = request
configuration.queryParameterSerializable = request
configuration.telemetryHeader = .userAgent
}
private func configureGetRefreshLibraryMetadataRequest(with configuration: URLRequestConfiguration, request: Operations.GetRefreshLibraryMetadataRequest) throws {
configuration.path = "/library/sections/{sectionKey}/refresh"
configuration.method = .get
@@ -460,6 +477,40 @@ private func handleGetLibraryItemsResponse(response: Client.APIResponse) throws
return .empty
}
private func handleGetAllMediaLibraryResponse(response: Client.APIResponse) throws -> Operations.GetAllMediaLibraryResponse {
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.GetAllMediaLibraryResponseBody.self, from: data))
} catch {
throw ResponseHandlerError.failedToDecodeJSON(error)
}
}
} else if httpResponse.statusCode == 400 {
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
do {
return .badRequest(try JSONDecoder().decode(Operations.GetAllMediaLibraryBadRequest.self, from: data))
} catch {
throw ResponseHandlerError.failedToDecodeJSON(error)
}
}
} else if httpResponse.statusCode == 401 {
if httpResponse.contentType.matchContentType(pattern: "application/json"), let data = response.data {
do {
return .unauthorized(try JSONDecoder().decode(Operations.GetAllMediaLibraryUnauthorized.self, from: data))
} catch {
throw ResponseHandlerError.failedToDecodeJSON(error)
}
}
} else if httpResponse.statusCode == 404 {
return .empty
}
return .empty
}
private func handleGetRefreshLibraryMetadataResponse(response: Client.APIResponse) throws -> Operations.GetRefreshLibraryMetadataResponse {
let httpResponse = response.httpResponse