Files
xtool-mirror/Sources/XKit/DeveloperServices/Teams/DeveloperServicesTeam.swift
Kabir Oberai 17d3d1019b Improve handling of paid developer accounts (#20)
* getTeamIsFree -> XcodeAuthData.team().isFree

* Only revoke certificates if on a free team

* Update OpenAPI spec, handle AVP

* Fix App ID capabilities on paid accounts
2025-05-12 18:14:36 +05:30

38 lines
969 B
Swift

//
// DeveloperServicesTeam.swift
// Supercharge
//
// Created by Kabir Oberai on 29/07/19.
// Copyright © 2019 Kabir Oberai. All rights reserved.
//
import Foundation
public struct DeveloperServicesTeam: Decodable, Sendable {
public struct ID: RawRepresentable, Decodable, Sendable, Hashable {
public let rawValue: String
public init(rawValue: String) { self.rawValue = rawValue }
}
public let id: ID
public let status: String
public let name: String
public struct Membership: Decodable, Sendable {
public let name: String
public let platform: DeveloperServicesPlatform
}
public let memberships: [Membership]
public var isFree: Bool {
!memberships.contains { $0.platform == .iOS && $0.name.contains("Apple Developer Program") }
}
private enum CodingKeys: String, CodingKey {
case id = "teamId"
case status
case name
case memberships
}
}