import Foundation /// Body für `POST /api/v1/decks`. Aus `DeckCreateSchema` in /// `cards/packages/cards-domain/src/schemas/deck.ts`. struct DeckCreateBody: Encodable { let name: String let description: String? let color: String? let category: DeckCategory? let visibility: DeckVisibility? enum CodingKeys: String, CodingKey { case name case description case color case category case visibility } } /// Body für `PATCH /api/v1/decks/:id`. Alle Felder optional plus `archived`. struct DeckUpdateBody: Encodable { var name: String? var description: String? var color: String? var category: DeckCategory? var visibility: DeckVisibility? var archived: Bool? enum CodingKeys: String, CodingKey { case name case description case color case category case visibility case archived } } /// Kurze Marketplace-Version-Info: Semver + Version-ID. struct PullUpdateVersion: Decodable { let semver: String let versionId: String enum CodingKeys: String, CodingKey { case semver case versionId = "version_id" } } /// Response von `POST /api/v1/marketplace/private/:deckId/pull-update`. /// `up_to_date == true` heißt: keine neue Marketplace-Version verfügbar, /// die anderen Counts sind dann 0. struct PullUpdateResponse: Decodable { let upToDate: Bool let from: PullUpdateVersion? let to: PullUpdateVersion? let added: Int let changed: Int let removed: Int let cardsInserted: Int? enum CodingKeys: String, CodingKey { case upToDate = "up_to_date" case from case to case added case changed case removed case cardsInserted = "cards_inserted" } }