import Foundation // MARK: - Auth struct LoginResponse: Codable { let user: UserResponse } struct UserResponse: Codable { let token: String let id: String } // MARK: - Library struct Library: Codable, Identifiable { let id: String let name: String } // MARK: - AudiobookItem struct AudiobookItem: Identifiable { let id: String let title: String let author: String let coverURL: String? let duration: Double let mediaFiles: [MediaFile] struct MediaFile { let ino: String let name: String let path: String } } // MARK: - Progress struct LibraryProgress: Codable { let currentTime: Double let duration: Double? let isFinished: Bool? enum CodingKeys: String, CodingKey { case currentTime case duration case isFinished } }