feat: add AI retouch and album preview actions
This commit is contained in:
@@ -43,6 +43,12 @@ protocol TravelAlbumServing {
|
||||
|
||||
/// 拉取相册小程序码。
|
||||
func mpCode(id: Int) async throws -> TravelAlbumMpCodeResponse
|
||||
|
||||
/// 拉取当前景区可用的 AI 修图模板。
|
||||
func aiRetouchTemplates(scenicId: Int) async throws -> TravelAlbumAIRetouchTemplatesResponse
|
||||
|
||||
/// 提交相册素材 AI 修图任务。
|
||||
func submitAIRetouch(_ request: TravelAlbumAIRetouchRequest) async throws
|
||||
}
|
||||
|
||||
@MainActor
|
||||
@@ -155,6 +161,24 @@ final class TravelAlbumAPI: TravelAlbumServing {
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/// 拉取当前景区可用的 AI 修图模板。
|
||||
func aiRetouchTemplates(scenicId: Int) async throws -> TravelAlbumAIRetouchTemplatesResponse {
|
||||
try await client.send(
|
||||
APIRequest(
|
||||
method: .get,
|
||||
path: "\(basePath)/ai-retouch-templates",
|
||||
queryItems: [URLQueryItem(name: "scenic_id", value: String(scenicId))]
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/// 提交相册素材 AI 修图任务;服务端 data 内容无需客户端消费。
|
||||
func submitAIRetouch(_ request: TravelAlbumAIRetouchRequest) async throws {
|
||||
let _: EmptyPayload = try await client.send(
|
||||
APIRequest(method: .post, path: "\(basePath)/ai-retouch", body: request)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// 旅拍相册 ID 请求体。
|
||||
|
||||
Reference in New Issue
Block a user