import Foundation struct GetInfoRequest: Encodable { let url: String } struct APIErrorPayload: Decodable, Error { let code: String let message: String } struct APIEnvelope: Decodable { let success: Bool let data: T? let error: APIErrorPayload? } struct GetInfoResponse: Decodable { let provider: String let title: String let year: Int? let plot: String? let ageRating: String? let type: String let genres: [String] let cast: [String] let backdrop: String? let currentSeason: Int? }