diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift index cdbe765d..b9ccc6eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift @@ -90,6 +90,10 @@ public enum V1 { } } + public enum AndroidToIosAppMappingDetails { + public enum ById {} + } + public enum AppCategories { public enum ById { public enum Parent {} @@ -498,6 +502,8 @@ public enum V1 { public enum AnalyticsReportRequests {} + public enum AndroidToIosAppMappingDetails {} + public enum AppAvailabilityV2 {} public enum AppClips {} @@ -573,6 +579,8 @@ public enum V1 { public enum AnalyticsReportRequests {} + public enum AndroidToIosAppMappingDetails {} + public enum AppAvailabilityV2 {} public enum AppClips {} @@ -1159,8 +1167,12 @@ public enum V1 { public enum Relationships { public enum Achievements {} + public enum AchievementsV2 {} + public enum Leaderboards {} + public enum LeaderboardsV2 {} + public enum Versions {} } @@ -1251,6 +1263,8 @@ public enum V1 { public enum Relationships { public enum Leaderboard {} + public enum LeaderboardV2 {} + public enum Versions {} } @@ -1268,6 +1282,8 @@ public enum V1 { public enum GameCenterAchievements {} + public enum GameCenterAchievementsV2 {} + public enum GameCenterActivities {} public enum GameCenterAppVersions {} @@ -1278,8 +1294,12 @@ public enum V1 { public enum GameCenterLeaderboardSets {} + public enum GameCenterLeaderboardSetsV2 {} + public enum GameCenterLeaderboards {} + public enum GameCenterLeaderboardsV2 {} + public enum LeaderboardReleases {} public enum LeaderboardSetReleases {} @@ -1301,6 +1321,8 @@ public enum V1 { public enum GameCenterAchievements {} + public enum GameCenterAchievementsV2 {} + public enum GameCenterActivities {} public enum GameCenterAppVersions {} @@ -1311,8 +1333,12 @@ public enum V1 { public enum GameCenterLeaderboardSets {} + public enum GameCenterLeaderboardSetsV2 {} + public enum GameCenterLeaderboards {} + public enum GameCenterLeaderboardsV2 {} + public enum LeaderboardReleases {} public enum LeaderboardSetReleases {} @@ -1334,6 +1360,8 @@ public enum V1 { public enum ById { public enum GameCenterAchievements {} + public enum GameCenterAchievementsV2 {} + public enum GameCenterActivities {} public enum GameCenterChallenges {} @@ -1342,11 +1370,17 @@ public enum V1 { public enum GameCenterLeaderboardSets {} + public enum GameCenterLeaderboardSetsV2 {} + public enum GameCenterLeaderboards {} + public enum GameCenterLeaderboardsV2 {} + public enum Relationships { public enum GameCenterAchievements {} + public enum GameCenterAchievementsV2 {} + public enum GameCenterActivities {} public enum GameCenterChallenges {} @@ -1355,7 +1389,11 @@ public enum V1 { public enum GameCenterLeaderboardSets {} + public enum GameCenterLeaderboardSetsV2 {} + public enum GameCenterLeaderboards {} + + public enum GameCenterLeaderboardsV2 {} } } } @@ -1536,6 +1574,34 @@ public enum V1 { public enum ById {} } + public enum InAppPurchaseOfferCodeCustomCodes { + public enum ById {} + } + + public enum InAppPurchaseOfferCodeOneTimeUseCodes { + public enum ById { + public enum Values {} + } + } + + public enum InAppPurchaseOfferCodes { + public enum ById { + public enum CustomCodes {} + + public enum OneTimeUseCodes {} + + public enum Prices {} + + public enum Relationships { + public enum CustomCodes {} + + public enum OneTimeUseCodes {} + + public enum Prices {} + } + } + } + public enum InAppPurchasePricePoints { public enum ById { public enum Equalizations {} @@ -1915,6 +1981,118 @@ public enum V2 { } } + public enum GameCenterAchievementImages { + public enum ById {} + } + + public enum GameCenterAchievementLocalizations { + public enum ById { + public enum Image {} + + public enum Relationships { + public enum Image {} + } + } + } + + public enum GameCenterAchievementVersions { + public enum ById { + public enum Localizations {} + + public enum Relationships { + public enum Localizations {} + } + } + } + + public enum GameCenterAchievements { + public enum ById { + public enum Relationships { + public enum Activity {} + + public enum Versions {} + } + + public enum Versions {} + } + } + + public enum GameCenterLeaderboardImages { + public enum ById {} + } + + public enum GameCenterLeaderboardLocalizations { + public enum ById { + public enum Image {} + + public enum Relationships { + public enum Image {} + } + } + } + + public enum GameCenterLeaderboardSetImages { + public enum ById {} + } + + public enum GameCenterLeaderboardSetLocalizations { + public enum ById { + public enum Image {} + + public enum Relationships { + public enum Image {} + } + } + } + + public enum GameCenterLeaderboardSetVersions { + public enum ById { + public enum Localizations {} + + public enum Relationships { + public enum Localizations {} + } + } + } + + public enum GameCenterLeaderboardSets { + public enum ById { + public enum GameCenterLeaderboards {} + + public enum Relationships { + public enum GameCenterLeaderboards {} + + public enum Versions {} + } + + public enum Versions {} + } + } + + public enum GameCenterLeaderboardVersions { + public enum ById { + public enum Localizations {} + + public enum Relationships { + public enum Localizations {} + } + } + } + + public enum GameCenterLeaderboards { + public enum ById { + public enum Relationships { + public enum Activity {} + + public enum Challenge {} + + public enum Versions {} + } + + public enum Versions {} + } + } + public enum InAppPurchases { public enum ById { public enum AppStoreReviewScreenshot {} @@ -1929,6 +2107,8 @@ public enum V2 { public enum InAppPurchaseLocalizations {} + public enum OfferCodes {} + public enum PricePoints {} public enum PromotedPurchase {} @@ -1946,6 +2126,8 @@ public enum V2 { public enum InAppPurchaseLocalizations {} + public enum OfferCodes {} + public enum PricePoints {} public enum PromotedPurchase {} diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift index ce704aed..d70e6398 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift @@ -146,6 +146,10 @@ extension V1.AlternativeDistributionPackages.ById.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift index 536ee543..d8fb68a8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift @@ -215,6 +215,10 @@ extension V1.AlternativeDistributionPackages.ById.Versions.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/AndroidToIosAppMappingDetails.POST.3cabd96.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/AndroidToIosAppMappingDetails.POST.3cabd96.generated.swift new file mode 100644 index 00000000..c3eda359 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/AndroidToIosAppMappingDetails.POST.3cabd96.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AndroidToIosAppMappingDetails { + public struct POST: Endpoint { + public typealias Parameters = AndroidToIosAppMappingDetailCreateRequest + public typealias Response = AndroidToIosAppMappingDetailResponse + + public var path: String { + "/v1/androidToIosAppMappingDetails" + } + + /// AndroidToIosAppMappingDetail representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AndroidToIosAppMappingDetail as `AndroidToIosAppMappingDetailResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AndroidToIosAppMappingDetailResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.DELETE.c999021.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.DELETE.c999021.generated.swift new file mode 100644 index 00000000..ad2bfb2c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.DELETE.c999021.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AndroidToIosAppMappingDetails.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/androidToIosAppMappingDetails/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.GET.c999021.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.GET.c999021.generated.swift new file mode 100644 index 00000000..40f26eb1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.GET.c999021.generated.swift @@ -0,0 +1,129 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AndroidToIosAppMappingDetails.ById { + public struct GET: Endpoint { + public typealias Response = AndroidToIosAppMappingDetailResponse + + public var path: String { + "/v1/androidToIosAppMappingDetails/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[androidToIosAppMappingDetails]", + value: parameters.fields[.androidToIosAppMappingDetails]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AndroidToIosAppMappingDetail as `AndroidToIosAppMappingDetailResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AndroidToIosAppMappingDetailResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AndroidToIosAppMappingDetails.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AndroidToIosAppMappingDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appSigningKeyPublicCertificateSha256Fingerprints: Self { + .init(rawValue: "appSigningKeyPublicCertificateSha256Fingerprints") + } + + public static var packageName: Self { + .init(rawValue: "packageName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type androidToIosAppMappingDetails + public static var androidToIosAppMappingDetails: Relation<[AndroidToIosAppMappingDetails]?> { + .init(key: "fields[androidToIosAppMappingDetails]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.PATCH.c999021.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.PATCH.c999021.generated.swift new file mode 100644 index 00000000..881c85dc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AndroidToIosAppMappingDetails/ById/AndroidToIosAppMappingDetailsById.PATCH.c999021.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AndroidToIosAppMappingDetails.ById { + public struct PATCH: Endpoint { + public typealias Parameters = AndroidToIosAppMappingDetailUpdateRequest + public typealias Response = AndroidToIosAppMappingDetailResponse + + public var path: String { + "/v1/androidToIosAppMappingDetails/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// AndroidToIosAppMappingDetail representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single AndroidToIosAppMappingDetail as `AndroidToIosAppMappingDetailResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AndroidToIosAppMappingDetailResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift index 2a3d75ac..ea62f3b5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift @@ -248,6 +248,10 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -636,6 +640,10 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -668,6 +676,10 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift index eb6fbbe9..4c6635d1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift @@ -244,6 +244,10 @@ extension V1.AppEncryptionDeclarations.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -276,6 +280,10 @@ extension V1.AppEncryptionDeclarations.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift index 88cfdd2d..74a0b053 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift @@ -108,6 +108,10 @@ extension V1.AppEncryptionDeclarations.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -140,6 +144,10 @@ extension V1.AppEncryptionDeclarations.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift index 819bcb7c..2f7e07fb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift @@ -240,6 +240,10 @@ extension V1.AppEncryptionDeclarations.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -272,6 +276,10 @@ extension V1.AppEncryptionDeclarations.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift index d67e814b..61cb780e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift @@ -146,6 +146,10 @@ extension V1.AppStoreVersions.ById.AlternativeDistributionPackage.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift index 1b923bbb..94e7c7c3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift @@ -339,6 +339,10 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -371,6 +375,10 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift index 7ac22ccc..08e542d1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift @@ -246,6 +246,10 @@ extension V1.AppStoreVersions.ById.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift index ed18baf5..d2d27c4a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift @@ -1147,6 +1147,10 @@ extension V1.AppStoreVersions.ById.CustomerReviews.GET { .init(rawValue: "WSM") } + public static var xks: Self { + .init(rawValue: "XKS") + } + public static var yem: Self { .init(rawValue: "YEM") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift index ad4c5935..458bd454 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift @@ -8,7 +8,7 @@ import FoundationNetworking extension V1.AppStoreVersions.ById.RoutingAppCoverage { public struct GET: Endpoint { - public typealias Response = RoutingAppCoverageWithoutIncludesResponse + public typealias Response = RoutingAppCoverageResponse public var path: String { "/v1/appStoreVersions/\(id)/routingAppCoverage" @@ -28,8 +28,12 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[appStoreVersions]", + value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[routingAppCoverages]", - value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")) + value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -40,7 +44,7 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage { return urlRequest } - /// - Returns: **200**, Single RoutingAppCoverage with get as `RoutingAppCoverageWithoutIncludesResponse` + /// - Returns: **200**, Single RoutingAppCoverage as `RoutingAppCoverageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` @@ -54,7 +58,7 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(RoutingAppCoverageWithoutIncludesResponse.self, from: data) + return try jsonDecoder.decode(RoutingAppCoverageResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -82,6 +86,9 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() + /// comma-separated list of relationships to include + public var include: [Include]? + public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -90,6 +97,118 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage.GET { private var values: [AnyHashable: AnyHashable] = [:] + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var appStoreVersion: Self { .init(rawValue: "appStoreVersion") @@ -127,6 +246,11 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage.GET { } public struct Relation: Hashable { + /// the fields to include for returned resources of type appStoreVersions + public static var appStoreVersions: Relation<[AppStoreVersions]?> { + .init(key: "fields[appStoreVersions]") + } + /// the fields to include for returned resources of type routingAppCoverages public static var routingAppCoverages: Relation<[RoutingAppCoverages]?> { .init(key: "fields[routingAppCoverages]") @@ -139,6 +263,22 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage.GET { } } } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift index 0466a779..5ae3b907 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift @@ -27,6 +27,8 @@ extension V1.Apps { components?.queryItems = [ URLQueryItem(name: "exists[gameCenterEnabledVersions]", value: parameters.exists[.gameCenterEnabledVersions].map { "\($0)" }), + URLQueryItem(name: "fields[androidToIosAppMappingDetails]", + value: parameters.fields[.androidToIosAppMappingDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClips]", value: parameters.fields[.appClips]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appCustomProductPages]", @@ -95,6 +97,8 @@ extension V1.Apps { value: parameters.filter[.sku]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[androidToIosAppMappingDetails]", + value: parameters.limit[.androidToIosAppMappingDetails].map { "\($0)" }), URLQueryItem(name: "limit[appClips]", value: parameters.limit[.appClips].map { "\($0)" }), URLQueryItem(name: "limit[appCustomProductPages]", @@ -224,6 +228,26 @@ extension V1.Apps.GET { private var values: [AnyHashable: AnyHashable] = [:] + public struct AndroidToIosAppMappingDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appSigningKeyPublicCertificateSha256Fingerprints: Self { + .init(rawValue: "appSigningKeyPublicCertificateSha256Fingerprints") + } + + public static var packageName: Self { + .init(rawValue: "packageName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var app: Self { .init(rawValue: "app") @@ -693,6 +717,10 @@ extension V1.Apps.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -725,6 +753,10 @@ extension V1.Apps.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -1309,14 +1341,26 @@ extension V1.Apps.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -1337,10 +1381,18 @@ extension V1.Apps.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -1437,6 +1489,10 @@ extension V1.Apps.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } @@ -1629,6 +1685,11 @@ extension V1.Apps.GET { } public struct Relation: Hashable { + /// the fields to include for returned resources of type androidToIosAppMappingDetails + public static var androidToIosAppMappingDetails: Relation<[AndroidToIosAppMappingDetails]?> { + .init(key: "fields[androidToIosAppMappingDetails]") + } + /// the fields to include for returned resources of type appClips public static var appClips: Relation<[AppClips]?> { .init(key: "fields[appClips]") @@ -2080,6 +2141,10 @@ extension V1.Apps.GET { } public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appClips: Self { .init(rawValue: "appClips") } @@ -2100,6 +2165,10 @@ extension V1.Apps.GET { .init(rawValue: "appInfos") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -2197,6 +2266,11 @@ extension V1.Apps.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related androidToIosAppMappingDetails returned (when they are included) + public static var androidToIosAppMappingDetails: Relation { + .init(key: "limit[androidToIosAppMappingDetails]") + } + /// maximum number of related appClips returned (when they are included) public static var appClips: Relation { .init(key: "limit[appClips]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AndroidToIosAppMappingDetails/AppsByIdAndroidToIosAppMappingDetails.GET.deec87d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AndroidToIosAppMappingDetails/AppsByIdAndroidToIosAppMappingDetails.GET.deec87d.generated.swift new file mode 100644 index 00000000..f36f84c6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AndroidToIosAppMappingDetails/AppsByIdAndroidToIosAppMappingDetails.GET.deec87d.generated.swift @@ -0,0 +1,134 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.AndroidToIosAppMappingDetails { + public struct GET: Endpoint { + public typealias Response = AndroidToIosAppMappingDetailsResponse + + public var path: String { + "/v1/apps/\(id)/androidToIosAppMappingDetails" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[androidToIosAppMappingDetails]", + value: parameters.fields[.androidToIosAppMappingDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AndroidToIosAppMappingDetails as `AndroidToIosAppMappingDetailsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AndroidToIosAppMappingDetailsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.AndroidToIosAppMappingDetails.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AndroidToIosAppMappingDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appSigningKeyPublicCertificateSha256Fingerprints: Self { + .init(rawValue: "appSigningKeyPublicCertificateSha256Fingerprints") + } + + public static var packageName: Self { + .init(rawValue: "packageName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type androidToIosAppMappingDetails + public static var androidToIosAppMappingDetails: Relation<[AndroidToIosAppMappingDetails]?> { + .init(key: "fields[androidToIosAppMappingDetails]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift index 0dc160ad..5bc0e530 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift @@ -187,6 +187,10 @@ extension V1.Apps.ById.AppClips.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -219,6 +223,10 @@ extension V1.Apps.ById.AppClips.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift index 90952660..1c0423d2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift @@ -191,6 +191,10 @@ extension V1.Apps.ById.AppCustomProductPages.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -223,6 +227,10 @@ extension V1.Apps.ById.AppCustomProductPages.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift index 78a60e3b..3ffe0f01 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift @@ -251,6 +251,10 @@ extension V1.Apps.ById.AppEncryptionDeclarations.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -283,6 +287,10 @@ extension V1.Apps.ById.AppEncryptionDeclarations.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift index 431800fd..97a26c6d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift @@ -399,6 +399,10 @@ extension V1.Apps.ById.AppInfos.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -431,6 +435,10 @@ extension V1.Apps.ById.AppInfos.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift index 598a0eee..bf37adfb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift @@ -157,6 +157,10 @@ extension V1.Apps.ById.AppPricePoints.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -189,6 +193,10 @@ extension V1.Apps.ById.AppPricePoints.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift index 5c619ed0..d29bd28f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift @@ -184,6 +184,10 @@ extension V1.Apps.ById.AppPriceSchedule.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -216,6 +220,10 @@ extension V1.Apps.ById.AppPriceSchedule.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift index 79169a77..89e28bec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift @@ -339,6 +339,10 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -371,6 +375,10 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift index 262a020d..f94b6bcb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift @@ -263,6 +263,10 @@ extension V1.Apps.ById.AppStoreVersions.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -651,6 +655,10 @@ extension V1.Apps.ById.AppStoreVersions.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -683,6 +691,10 @@ extension V1.Apps.ById.AppStoreVersions.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift index 6d885093..9980edfe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift @@ -28,6 +28,8 @@ extension V1.Apps.ById { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[androidToIosAppMappingDetails]", + value: parameters.fields[.androidToIosAppMappingDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClips]", value: parameters.fields[.appClips]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appCustomProductPages]", @@ -76,6 +78,8 @@ extension V1.Apps.ById { value: parameters.fields[.subscriptionGroups]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[androidToIosAppMappingDetails]", + value: parameters.limit[.androidToIosAppMappingDetails].map { "\($0)" }), URLQueryItem(name: "limit[appClips]", value: parameters.limit[.appClips].map { "\($0)" }), URLQueryItem(name: "limit[appCustomProductPages]", @@ -175,6 +179,26 @@ extension V1.Apps.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] + public struct AndroidToIosAppMappingDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appSigningKeyPublicCertificateSha256Fingerprints: Self { + .init(rawValue: "appSigningKeyPublicCertificateSha256Fingerprints") + } + + public static var packageName: Self { + .init(rawValue: "packageName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var app: Self { .init(rawValue: "app") @@ -644,6 +668,10 @@ extension V1.Apps.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -676,6 +704,10 @@ extension V1.Apps.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -1260,14 +1292,26 @@ extension V1.Apps.ById.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -1288,10 +1332,18 @@ extension V1.Apps.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -1388,6 +1440,10 @@ extension V1.Apps.ById.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } @@ -1580,6 +1636,11 @@ extension V1.Apps.ById.GET { } public struct Relation: Hashable { + /// the fields to include for returned resources of type androidToIosAppMappingDetails + public static var androidToIosAppMappingDetails: Relation<[AndroidToIosAppMappingDetails]?> { + .init(key: "fields[androidToIosAppMappingDetails]") + } + /// the fields to include for returned resources of type appClips public static var appClips: Relation<[AppClips]?> { .init(key: "fields[appClips]") @@ -1704,6 +1765,10 @@ extension V1.Apps.ById.GET { } public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appClips: Self { .init(rawValue: "appClips") } @@ -1724,6 +1789,10 @@ extension V1.Apps.ById.GET { .init(rawValue: "appInfos") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -1816,6 +1885,11 @@ extension V1.Apps.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related androidToIosAppMappingDetails returned (when they are included) + public static var androidToIosAppMappingDetails: Relation { + .init(key: "limit[androidToIosAppMappingDetails]") + } + /// maximum number of related appClips returned (when they are included) public static var appClips: Relation { .init(key: "limit[appClips]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift index 0c3a4e86..724abaea 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift @@ -34,6 +34,8 @@ extension V1.Apps.ById.BackgroundAssets { value: parameters.fields[.backgroundAssetVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[backgroundAssets]", value: parameters.fields[.backgroundAssets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[assetPackIdentifier]", value: parameters.filter[.assetPackIdentifier]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -125,6 +127,10 @@ extension V1.Apps.ById.BackgroundAssets.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -157,6 +163,10 @@ extension V1.Apps.ById.BackgroundAssets.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -373,6 +383,10 @@ extension V1.Apps.ById.BackgroundAssets.GET { .init(rawValue: "state") } + public static var stateDetails: Self { + .init(rawValue: "stateDetails") + } + public static var version: Self { .init(rawValue: "version") } @@ -397,6 +411,10 @@ extension V1.Apps.ById.BackgroundAssets.GET { .init(rawValue: "appStoreVersion") } + public static var archived: Self { + .init(rawValue: "archived") + } + public static var assetPackIdentifier: Self { .init(rawValue: "assetPackIdentifier") } @@ -461,6 +479,11 @@ extension V1.Apps.ById.BackgroundAssets.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + /// filter by attribute 'assetPackIdentifier' public static var assetPackIdentifier: Relation<[String]?> { .init(key: "filter[assetPackIdentifier]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift index 51c2b3df..8bed8165 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift @@ -230,6 +230,10 @@ extension V1.Apps.ById.BetaFeedbackCrashSubmissions.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift index 48bc1c59..13924975 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift @@ -230,6 +230,10 @@ extension V1.Apps.ById.BetaFeedbackScreenshotSubmissions.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift index b8e35d6d..59ec43d3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift @@ -122,6 +122,10 @@ extension V1.Apps.ById.CiProduct.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -154,6 +158,10 @@ extension V1.Apps.ById.CiProduct.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift index fc95ce2a..6309a652 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift @@ -1147,6 +1147,10 @@ extension V1.Apps.ById.CustomerReviews.GET { .init(rawValue: "WSM") } + public static var xks: Self { + .init(rawValue: "XKS") + } + public static var yem: Self { .init(rawValue: "YEM") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift index d7991b59..f09543be 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift @@ -68,6 +68,8 @@ extension V1.Apps.ById.GameCenterDetail { value: parameters.limit[.challengeReleases].map { "\($0)" }), URLQueryItem(name: "limit[challengesMinimumPlatformVersions]", value: parameters.limit[.challengesMinimumPlatformVersions].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterAchievementsV2]", + value: parameters.limit[.gameCenterAchievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterActivities]", @@ -76,8 +78,12 @@ extension V1.Apps.ById.GameCenterDetail { value: parameters.limit[.gameCenterAppVersions].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterChallenges]", value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardSetsV2]", + value: parameters.limit[.gameCenterLeaderboardSetsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardsV2]", + value: parameters.limit[.gameCenterLeaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), URLQueryItem(name: "limit[leaderboardReleases]", @@ -278,6 +284,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -310,6 +320,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -562,6 +576,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -578,6 +596,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -594,6 +616,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -714,6 +740,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -774,14 +804,26 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -802,10 +844,18 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -830,6 +880,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -846,10 +900,18 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -946,6 +1008,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -1038,6 +1104,10 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -1162,14 +1232,26 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -1190,10 +1272,18 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -1242,6 +1332,11 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(key: "limit[challengesMinimumPlatformVersions]") } + /// maximum number of related gameCenterAchievementsV2 returned (when they are included) + public static var gameCenterAchievementsV2: Relation { + .init(key: "limit[gameCenterAchievementsV2]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") @@ -1262,11 +1357,21 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(key: "limit[gameCenterChallenges]") } + /// maximum number of related gameCenterLeaderboardSetsV2 returned (when they are included) + public static var gameCenterLeaderboardSetsV2: Relation { + .init(key: "limit[gameCenterLeaderboardSetsV2]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") } + /// maximum number of related gameCenterLeaderboardsV2 returned (when they are included) + public static var gameCenterLeaderboardsV2: Relation { + .init(key: "limit[gameCenterLeaderboardsV2]") + } + /// maximum number of related gameCenterLeaderboards returned (when they are included) public static var gameCenterLeaderboards: Relation { .init(key: "limit[gameCenterLeaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift index 801b5829..f669110a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift @@ -135,6 +135,10 @@ extension V1.Apps.ById.GameCenterEnabledVersions.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -167,6 +171,10 @@ extension V1.Apps.ById.GameCenterEnabledVersions.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift index 3e084d00..860fc8e7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift @@ -133,6 +133,10 @@ extension V1.Apps.ById.InAppPurchases.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -165,6 +169,10 @@ extension V1.Apps.ById.InAppPurchases.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift index c6b9ae5c..c68887c8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift @@ -38,6 +38,8 @@ extension V1.Apps.ById.InAppPurchasesV2 { value: parameters.fields[.inAppPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchaseLocalizations]", value: parameters.fields[.inAppPurchaseLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodes]", + value: parameters.fields[.inAppPurchaseOfferCodes]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchasePriceSchedules]", value: parameters.fields[.inAppPurchasePriceSchedules]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchases]", @@ -58,6 +60,8 @@ extension V1.Apps.ById.InAppPurchasesV2 { value: parameters.limit[.images].map { "\($0)" }), URLQueryItem(name: "limit[inAppPurchaseLocalizations]", value: parameters.limit[.inAppPurchaseLocalizations].map { "\($0)" }), + URLQueryItem(name: "limit[offerCodes]", + value: parameters.limit[.offerCodes].map { "\($0)" }), URLQueryItem(name: "limit", value: parameters.limit[].map { "\($0)" }), URLQueryItem(name: "sort", @@ -309,6 +313,50 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { } } + public struct InAppPurchaseOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var automaticPrices: Self { .init(rawValue: "automaticPrices") @@ -374,6 +422,10 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } @@ -463,6 +515,11 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { .init(key: "fields[inAppPurchaseLocalizations]") } + /// the fields to include for returned resources of type inAppPurchaseOfferCodes + public static var inAppPurchaseOfferCodes: Relation<[InAppPurchaseOfferCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodes]") + } + /// the fields to include for returned resources of type inAppPurchasePriceSchedules public static var inAppPurchasePriceSchedules: Relation<[InAppPurchasePriceSchedules]?> { .init(key: "fields[inAppPurchasePriceSchedules]") @@ -632,6 +689,10 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { .init(rawValue: "inAppPurchaseLocalizations") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var promotedPurchase: Self { .init(rawValue: "promotedPurchase") } @@ -671,6 +732,11 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { .init(key: "limit[inAppPurchaseLocalizations]") } + /// maximum number of related offerCodes returned (when they are included) + public static var offerCodes: Relation { + .init(key: "limit[offerCodes]") + } + internal let key: String public func hash(into hasher: inout Hasher) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift index e96e91b6..9e91dc23 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift @@ -145,6 +145,10 @@ extension V1.Apps.ById.PromotedPurchases.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AndroidToIosAppMappingDetails/AppsByIdRelationshipsAndroidToIosAppMappingDetails.GET.313bda2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AndroidToIosAppMappingDetails/AppsByIdRelationshipsAndroidToIosAppMappingDetails.GET.313bda2.generated.swift new file mode 100644 index 00000000..ab1c355d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AndroidToIosAppMappingDetails/AppsByIdRelationshipsAndroidToIosAppMappingDetails.GET.313bda2.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AndroidToIosAppMappingDetails { + public struct GET: Endpoint { + public typealias Response = AppAndroidToIosAppMappingDetailsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/androidToIosAppMappingDetails" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAndroidToIosAppMappingDetailsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAndroidToIosAppMappingDetailsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AndroidToIosAppMappingDetails.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift index c390b90a..0794aa89 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift @@ -277,6 +277,10 @@ extension V1.Apps.ById.ReviewSubmissions.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -309,6 +313,10 @@ extension V1.Apps.ById.ReviewSubmissions.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -509,6 +517,26 @@ extension V1.Apps.ById.ReviewSubmissions.GET { .init(rawValue: "backgroundAssetVersion") } + public static var gameCenterAchievementVersion: Self { + .init(rawValue: "gameCenterAchievementVersion") + } + + public static var gameCenterActivityVersion: Self { + .init(rawValue: "gameCenterActivityVersion") + } + + public static var gameCenterChallengeVersion: Self { + .init(rawValue: "gameCenterChallengeVersion") + } + + public static var gameCenterLeaderboardSetVersion: Self { + .init(rawValue: "gameCenterLeaderboardSetVersion") + } + + public static var gameCenterLeaderboardVersion: Self { + .init(rawValue: "gameCenterLeaderboardVersion") + } + public static var state: Self { .init(rawValue: "state") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift index c78a335a..8c6c6c6e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift @@ -119,6 +119,10 @@ extension V1.Apps.ById.Webhooks.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -151,6 +155,10 @@ extension V1.Apps.ById.Webhooks.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift index 453fc57c..b6c46dc2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift @@ -136,6 +136,10 @@ extension V1.BackgroundAssetVersions.ById.GET { .init(rawValue: "state") } + public static var stateDetails: Self { + .init(rawValue: "stateDetails") + } + public static var version: Self { .init(rawValue: "version") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift index 436c4d72..9569ca03 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift @@ -104,6 +104,10 @@ extension V1.BackgroundAssets.ById.GET { .init(rawValue: "appStoreVersion") } + public static var archived: Self { + .init(rawValue: "archived") + } + public static var assetPackIdentifier: Self { .init(rawValue: "assetPackIdentifier") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.PATCH.ab8fadb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.PATCH.ab8fadb.generated.swift new file mode 100644 index 00000000..742f77c5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.PATCH.ab8fadb.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssets.ById { + public struct PATCH: Endpoint { + public typealias Parameters = BackgroundAssetUpdateRequest + public typealias Response = BackgroundAssetResponse + + public var path: String { + "/v1/backgroundAssets/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// BackgroundAsset representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single BackgroundAsset as `BackgroundAssetResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift index 120d7712..00e6014e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift @@ -272,6 +272,10 @@ extension V1.BackgroundAssets.ById.Versions.GET { .init(rawValue: "state") } + public static var stateDetails: Self { + .init(rawValue: "stateDetails") + } + public static var version: Self { .init(rawValue: "version") } @@ -296,6 +300,10 @@ extension V1.BackgroundAssets.ById.Versions.GET { .init(rawValue: "appStoreVersion") } + public static var archived: Self { + .init(rawValue: "archived") + } + public static var assetPackIdentifier: Self { .init(rawValue: "assetPackIdentifier") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift index fb1fce10..0ccfc3f4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift @@ -118,6 +118,10 @@ extension V1.BetaAppLocalizations.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -150,6 +154,10 @@ extension V1.BetaAppLocalizations.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift index c540787c..9f16ee2b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift @@ -107,6 +107,10 @@ extension V1.BetaAppLocalizations.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.BetaAppLocalizations.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift index 84debfc4..80741765 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift @@ -114,6 +114,10 @@ extension V1.BetaAppLocalizations.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -146,6 +150,10 @@ extension V1.BetaAppLocalizations.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift index 865f8993..e41b37b5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift @@ -116,6 +116,10 @@ extension V1.BetaAppReviewDetails.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -148,6 +152,10 @@ extension V1.BetaAppReviewDetails.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift index db061cb2..c0e5bc32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift @@ -107,6 +107,10 @@ extension V1.BetaAppReviewDetails.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.BetaAppReviewDetails.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift index 6fc7c043..3fd0c041 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift @@ -114,6 +114,10 @@ extension V1.BetaAppReviewDetails.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -146,6 +150,10 @@ extension V1.BetaAppReviewDetails.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift index 4068d571..7e8202c2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift @@ -145,6 +145,10 @@ extension V1.BetaGroups.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -177,6 +181,10 @@ extension V1.BetaGroups.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -453,6 +461,10 @@ extension V1.BetaGroups.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift index 8cd38ca3..259a0b6a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift @@ -107,6 +107,10 @@ extension V1.BetaGroups.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.BetaGroups.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift index e8627b1f..42add233 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift @@ -126,6 +126,10 @@ extension V1.BetaGroups.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -158,6 +162,10 @@ extension V1.BetaGroups.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -434,6 +442,10 @@ extension V1.BetaGroups.ById.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift index cefaed0a..7de5d182 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift @@ -96,6 +96,10 @@ extension V1.BetaGroups.ById.BetaTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift index 97d5da9a..0566bceb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift @@ -116,6 +116,10 @@ extension V1.BetaLicenseAgreements.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -148,6 +152,10 @@ extension V1.BetaLicenseAgreements.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift index a08c8f9f..7bbbfbd0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift @@ -107,6 +107,10 @@ extension V1.BetaLicenseAgreements.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.BetaLicenseAgreements.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift index e42317c5..50fc0596 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift @@ -114,6 +114,10 @@ extension V1.BetaLicenseAgreements.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -146,6 +150,10 @@ extension V1.BetaLicenseAgreements.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift index f78be609..f8f6182c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift @@ -145,6 +145,10 @@ extension V1.BetaTesters.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -177,6 +181,10 @@ extension V1.BetaTesters.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -433,6 +441,10 @@ extension V1.BetaTesters.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift index a47c275e..3fc48a86 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift @@ -112,6 +112,10 @@ extension V1.BetaTesters.ById.Apps.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -144,6 +148,10 @@ extension V1.BetaTesters.ById.Apps.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift index 8a54adb4..73eaa820 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift @@ -126,6 +126,10 @@ extension V1.BetaTesters.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -158,6 +162,10 @@ extension V1.BetaTesters.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -414,6 +422,10 @@ extension V1.BetaTesters.ById.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift index 8753a5f9..504244f8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift @@ -389,6 +389,10 @@ extension V1.Builds.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -421,6 +425,10 @@ extension V1.Builds.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -645,6 +653,10 @@ extension V1.Builds.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift index 479ddbd0..3d79202f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift @@ -107,6 +107,10 @@ extension V1.Builds.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.Builds.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift index 31d40cae..4baa10ce 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift @@ -248,6 +248,10 @@ extension V1.Builds.ById.AppStoreVersion.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -636,6 +640,10 @@ extension V1.Builds.ById.AppStoreVersion.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -668,6 +676,10 @@ extension V1.Builds.ById.AppStoreVersion.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift index 55ac33df..75b98e88 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift @@ -334,6 +334,10 @@ extension V1.Builds.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -366,6 +370,10 @@ extension V1.Builds.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -590,6 +598,10 @@ extension V1.Builds.ById.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift index 54c7f8f5..8d8fa926 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift @@ -96,6 +96,10 @@ extension V1.Builds.ById.IndividualTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift index 3dd0704f..9a3f3997 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift @@ -137,6 +137,10 @@ extension V1.BundleIds.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -169,6 +173,10 @@ extension V1.BundleIds.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift index c1a187c6..430148a4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift @@ -107,6 +107,10 @@ extension V1.BundleIds.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.BundleIds.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift index e412adbd..67585328 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift @@ -124,6 +124,10 @@ extension V1.BundleIds.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -156,6 +160,10 @@ extension V1.BundleIds.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift index 8eb7c4fe..e3421f93 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift @@ -402,6 +402,10 @@ extension V1.CiBuildRuns.ById.Builds.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -434,6 +438,10 @@ extension V1.CiBuildRuns.ById.Builds.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -738,6 +746,10 @@ extension V1.CiBuildRuns.ById.Builds.GET { } public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appDevices: Self { + .init(rawValue: "appDevices") + } + public static var apps: Self { .init(rawValue: "apps") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift index be3940c0..ce547665 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift @@ -28,6 +28,8 @@ extension V1.CiProducts.ById.App { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[androidToIosAppMappingDetails]", + value: parameters.fields[.androidToIosAppMappingDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClips]", value: parameters.fields[.appClips]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appCustomProductPages]", @@ -52,6 +54,8 @@ extension V1.CiProducts.ById.App { value: parameters.fields[.betaGroups]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[betaLicenseAgreements]", value: parameters.fields[.betaLicenseAgreements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[buildIcons]", + value: parameters.fields[.buildIcons]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciProducts]", @@ -76,6 +80,8 @@ extension V1.CiProducts.ById.App { value: parameters.fields[.subscriptionGroups]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[androidToIosAppMappingDetails]", + value: parameters.limit[.androidToIosAppMappingDetails].map { "\($0)" }), URLQueryItem(name: "limit[appClips]", value: parameters.limit[.appClips].map { "\($0)" }), URLQueryItem(name: "limit[appCustomProductPages]", @@ -175,6 +181,26 @@ extension V1.CiProducts.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] + public struct AndroidToIosAppMappingDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appSigningKeyPublicCertificateSha256Fingerprints: Self { + .init(rawValue: "appSigningKeyPublicCertificateSha256Fingerprints") + } + + public static var packageName: Self { + .init(rawValue: "packageName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var app: Self { .init(rawValue: "app") @@ -644,6 +670,10 @@ extension V1.CiProducts.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -676,6 +706,10 @@ extension V1.CiProducts.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -1039,6 +1073,34 @@ extension V1.CiProducts.ById.App.GET { } } + public struct BuildIcons: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var iconType: Self { + .init(rawValue: "iconType") + } + + public static var masked: Self { + .init(rawValue: "masked") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var app: Self { .init(rawValue: "app") @@ -1260,14 +1322,26 @@ extension V1.CiProducts.ById.App.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -1288,10 +1362,18 @@ extension V1.CiProducts.ById.App.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -1388,6 +1470,10 @@ extension V1.CiProducts.ById.App.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } @@ -1580,6 +1666,11 @@ extension V1.CiProducts.ById.App.GET { } public struct Relation: Hashable { + /// the fields to include for returned resources of type androidToIosAppMappingDetails + public static var androidToIosAppMappingDetails: Relation<[AndroidToIosAppMappingDetails]?> { + .init(key: "fields[androidToIosAppMappingDetails]") + } + /// the fields to include for returned resources of type appClips public static var appClips: Relation<[AppClips]?> { .init(key: "fields[appClips]") @@ -1640,6 +1731,11 @@ extension V1.CiProducts.ById.App.GET { .init(key: "fields[betaLicenseAgreements]") } + /// the fields to include for returned resources of type buildIcons + public static var buildIcons: Relation<[BuildIcons]?> { + .init(key: "fields[buildIcons]") + } + /// the fields to include for returned resources of type builds public static var builds: Relation<[Builds]?> { .init(key: "fields[builds]") @@ -1704,6 +1800,10 @@ extension V1.CiProducts.ById.App.GET { } public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appClips: Self { .init(rawValue: "appClips") } @@ -1724,6 +1824,10 @@ extension V1.CiProducts.ById.App.GET { .init(rawValue: "appInfos") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -1816,6 +1920,11 @@ extension V1.CiProducts.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related androidToIosAppMappingDetails returned (when they are included) + public static var androidToIosAppMappingDetails: Relation { + .init(key: "limit[androidToIosAppMappingDetails]") + } + /// maximum number of related appClips returned (when they are included) public static var appClips: Relation { .init(key: "limit[appClips]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift index e1e738f6..89d619da 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift @@ -120,6 +120,10 @@ extension V1.CiProducts.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -152,6 +156,10 @@ extension V1.CiProducts.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift index 35be143c..d5b70d65 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift @@ -122,6 +122,10 @@ extension V1.CiProducts.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -154,6 +158,10 @@ extension V1.CiProducts.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift index a9abf09c..1d63b22c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift @@ -240,6 +240,10 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -256,6 +260,10 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -332,14 +340,26 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -360,10 +380,18 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -388,6 +416,10 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -404,10 +436,18 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift index b2ba6f39..44788eec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift @@ -241,6 +241,10 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -257,6 +261,10 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -333,14 +341,26 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -361,10 +381,18 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -389,6 +417,10 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -405,10 +437,18 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift index 34ec6e29..90f97a98 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift @@ -231,14 +231,26 @@ extension V1.GameCenterAchievements.ById.Releases.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -259,10 +271,18 @@ extension V1.GameCenterAchievements.ById.Releases.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift index b510672c..5dfd3eb7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift @@ -34,8 +34,12 @@ extension V1.GameCenterActivities.ById { value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[achievementsV2]", + value: parameters.limit[.achievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[achievements]", value: parameters.limit[.achievements].map { "\($0)" }), + URLQueryItem(name: "limit[leaderboardsV2]", + value: parameters.limit[.leaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[leaderboards]", value: parameters.limit[.leaderboards].map { "\($0)" }), URLQueryItem(name: "limit[versions]", @@ -110,6 +114,10 @@ extension V1.GameCenterActivities.ById.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -126,6 +134,10 @@ extension V1.GameCenterActivities.ById.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -233,6 +245,10 @@ extension V1.GameCenterActivities.ById.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var gameCenterDetail: Self { .init(rawValue: "gameCenterDetail") } @@ -245,6 +261,10 @@ extension V1.GameCenterActivities.ById.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -269,11 +289,21 @@ extension V1.GameCenterActivities.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related achievementsV2 returned (when they are included) + public static var achievementsV2: Relation { + .init(key: "limit[achievementsV2]") + } + /// maximum number of related achievements returned (when they are included) public static var achievements: Relation { .init(key: "limit[achievements]") } + /// maximum number of related leaderboardsV2 returned (when they are included) + public static var leaderboardsV2: Relation { + .init(key: "limit[leaderboardsV2]") + } + /// maximum number of related leaderboards returned (when they are included) public static var leaderboards: Relation { .init(key: "limit[leaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/AchievementsV2/GameCenterActivitiesByIdRelationshipsAchievementsV2.DELETE.1955bea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/AchievementsV2/GameCenterActivitiesByIdRelationshipsAchievementsV2.DELETE.1955bea.generated.swift new file mode 100644 index 00000000..104420e8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/AchievementsV2/GameCenterActivitiesByIdRelationshipsAchievementsV2.DELETE.1955bea.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.AchievementsV2 { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/achievementsV2" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/AchievementsV2/GameCenterActivitiesByIdRelationshipsAchievementsV2.POST.1955bea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/AchievementsV2/GameCenterActivitiesByIdRelationshipsAchievementsV2.POST.1955bea.generated.swift new file mode 100644 index 00000000..a5874bb4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/AchievementsV2/GameCenterActivitiesByIdRelationshipsAchievementsV2.POST.1955bea.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.AchievementsV2 { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityAchievementsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/achievementsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/LeaderboardsV2/GameCenterActivitiesByIdRelationshipsLeaderboardsV2.DELETE.ee85bbb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/LeaderboardsV2/GameCenterActivitiesByIdRelationshipsLeaderboardsV2.DELETE.ee85bbb.generated.swift new file mode 100644 index 00000000..e2308ae0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/LeaderboardsV2/GameCenterActivitiesByIdRelationshipsLeaderboardsV2.DELETE.ee85bbb.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.LeaderboardsV2 { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/leaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/LeaderboardsV2/GameCenterActivitiesByIdRelationshipsLeaderboardsV2.POST.ee85bbb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/LeaderboardsV2/GameCenterActivitiesByIdRelationshipsLeaderboardsV2.POST.ee85bbb.generated.swift new file mode 100644 index 00000000..a2f29dd3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/LeaderboardsV2/GameCenterActivitiesByIdRelationshipsLeaderboardsV2.POST.ee85bbb.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.LeaderboardsV2 { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityLeaderboardsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/leaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift index 1da0e0a3..ce2d6853 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift @@ -117,6 +117,10 @@ extension V1.GameCenterActivities.ById.Versions.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -133,6 +137,10 @@ extension V1.GameCenterActivities.ById.Versions.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift index c1f8853e..2a2fcc97 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift @@ -248,6 +248,10 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { } public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -636,6 +640,10 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -668,6 +676,10 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift index 542677dc..b8d89c6e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift @@ -158,6 +158,10 @@ extension V1.GameCenterChallenges.ById.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -217,6 +221,10 @@ extension V1.GameCenterChallenges.ById.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/LeaderboardV2/GameCenterChallengesByIdRelationshipsLeaderboardV2.PATCH.171990f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/LeaderboardV2/GameCenterChallengesByIdRelationshipsLeaderboardV2.PATCH.171990f.generated.swift new file mode 100644 index 00000000..cb3fe286 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/LeaderboardV2/GameCenterChallengesByIdRelationshipsLeaderboardV2.PATCH.171990f.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById.Relationships.LeaderboardV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterChallengeLeaderboardV2LinkageRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterChallenges/\(id)/relationships/leaderboardV2" + } + + /// the id of the requested resource + public var id: String + + /// Related linkage + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift index c04eec84..d4abec4d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift @@ -249,6 +249,10 @@ extension V1.GameCenterChallenges.ById.Versions.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift index e76d656c..23badac7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift @@ -231,14 +231,26 @@ extension V1.GameCenterDetails.ById.AchievementReleases.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -259,10 +271,18 @@ extension V1.GameCenterDetails.ById.AchievementReleases.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift index 02530093..b9291479 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift @@ -251,6 +251,10 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -267,6 +271,10 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -343,14 +351,26 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -371,10 +391,18 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -399,6 +427,10 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -415,10 +447,18 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievementsV2/GameCenterDetailsByIdGameCenterAchievementsV2.GET.3f9053f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievementsV2/GameCenterDetailsByIdGameCenterAchievementsV2.GET.3f9053f.generated.swift new file mode 100644 index 00000000..ee56ddd1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievementsV2/GameCenterDetailsByIdGameCenterAchievementsV2.GET.3f9053f.generated.swift @@ -0,0 +1,556 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.GameCenterAchievementsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementsV2Response + + public var path: String { + "/v1/gameCenterDetails/\(id)/gameCenterAchievementsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievements]", + value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterAchievements as `GameCenterAchievementsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.GameCenterAchievementsV2.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + /// the fields to include for returned resources of type gameCenterAchievements + public static var gameCenterAchievements: Relation<[GameCenterAchievements]?> { + .init(key: "fields[gameCenterAchievements]") + } + + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift index 03456455..8a3de4a5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift @@ -42,8 +42,12 @@ extension V1.GameCenterDetails.ById.GameCenterActivities { value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[achievementsV2]", + value: parameters.limit[.achievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[achievements]", value: parameters.limit[.achievements].map { "\($0)" }), + URLQueryItem(name: "limit[leaderboardsV2]", + value: parameters.limit[.leaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[leaderboards]", value: parameters.limit[.leaderboards].map { "\($0)" }), URLQueryItem(name: "limit[versions]", @@ -169,6 +173,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -185,6 +193,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -201,6 +213,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -317,14 +333,26 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -345,10 +373,18 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -373,6 +409,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -389,10 +429,18 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -489,6 +537,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -548,6 +600,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var gameCenterDetail: Self { .init(rawValue: "gameCenterDetail") } @@ -560,6 +616,10 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -589,11 +649,21 @@ extension V1.GameCenterDetails.ById.GameCenterActivities.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related achievementsV2 returned (when they are included) + public static var achievementsV2: Relation { + .init(key: "limit[achievementsV2]") + } + /// maximum number of related achievements returned (when they are included) public static var achievements: Relation { .init(key: "limit[achievements]") } + /// maximum number of related leaderboardsV2 returned (when they are included) + public static var leaderboardsV2: Relation { + .init(key: "limit[leaderboardsV2]") + } + /// maximum number of related leaderboards returned (when they are included) public static var leaderboards: Relation { .init(key: "limit[leaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift index 87bc06aa..cd1ef356 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift @@ -175,6 +175,10 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -235,14 +239,26 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -263,10 +279,18 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -291,6 +315,10 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -307,10 +335,18 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -407,6 +443,10 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -501,6 +541,10 @@ extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift index 218e12d5..00cef66e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift @@ -64,6 +64,8 @@ extension V1.GameCenterDetails.ById { value: parameters.limit[.challengeReleases].map { "\($0)" }), URLQueryItem(name: "limit[challengesMinimumPlatformVersions]", value: parameters.limit[.challengesMinimumPlatformVersions].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterAchievementsV2]", + value: parameters.limit[.gameCenterAchievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterActivities]", @@ -72,8 +74,12 @@ extension V1.GameCenterDetails.ById { value: parameters.limit[.gameCenterAppVersions].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterChallenges]", value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardSetsV2]", + value: parameters.limit[.gameCenterLeaderboardSetsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardsV2]", + value: parameters.limit[.gameCenterLeaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), URLQueryItem(name: "limit[leaderboardReleases]", @@ -222,6 +228,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -238,6 +248,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -254,6 +268,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -374,6 +392,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -434,14 +456,26 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -462,10 +496,18 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -490,6 +532,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -506,10 +552,18 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -606,6 +660,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -698,6 +756,10 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -812,14 +874,26 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -840,10 +914,18 @@ extension V1.GameCenterDetails.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -892,6 +974,11 @@ extension V1.GameCenterDetails.ById.GET { .init(key: "limit[challengesMinimumPlatformVersions]") } + /// maximum number of related gameCenterAchievementsV2 returned (when they are included) + public static var gameCenterAchievementsV2: Relation { + .init(key: "limit[gameCenterAchievementsV2]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") @@ -912,11 +999,21 @@ extension V1.GameCenterDetails.ById.GET { .init(key: "limit[gameCenterChallenges]") } + /// maximum number of related gameCenterLeaderboardSetsV2 returned (when they are included) + public static var gameCenterLeaderboardSetsV2: Relation { + .init(key: "limit[gameCenterLeaderboardSetsV2]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") } + /// maximum number of related gameCenterLeaderboardsV2 returned (when they are included) + public static var gameCenterLeaderboardsV2: Relation { + .init(key: "limit[gameCenterLeaderboardsV2]") + } + /// maximum number of related gameCenterLeaderboards returned (when they are included) public static var gameCenterLeaderboards: Relation { .init(key: "limit[gameCenterLeaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift index acdacc12..4bd79159 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift @@ -44,6 +44,8 @@ extension V1.GameCenterDetails.ById.GameCenterGroup { value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterAchievementsV2]", + value: parameters.limit[.gameCenterAchievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterActivities]", @@ -52,8 +54,12 @@ extension V1.GameCenterDetails.ById.GameCenterGroup { value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterDetails]", value: parameters.limit[.gameCenterDetails].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardSetsV2]", + value: parameters.limit[.gameCenterLeaderboardSetsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardsV2]", + value: parameters.limit[.gameCenterLeaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }) ].filter { $0.value != nil } @@ -174,6 +180,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -190,6 +200,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -206,6 +220,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -270,6 +288,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -330,14 +352,26 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -358,10 +392,18 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -386,6 +428,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -402,10 +448,18 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -454,6 +508,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -546,6 +604,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -610,6 +672,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -626,10 +692,18 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public var description: String { rawValue } @@ -650,6 +724,11 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related gameCenterAchievementsV2 returned (when they are included) + public static var gameCenterAchievementsV2: Relation { + .init(key: "limit[gameCenterAchievementsV2]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") @@ -670,11 +749,21 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(key: "limit[gameCenterDetails]") } + /// maximum number of related gameCenterLeaderboardSetsV2 returned (when they are included) + public static var gameCenterLeaderboardSetsV2: Relation { + .init(key: "limit[gameCenterLeaderboardSetsV2]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") } + /// maximum number of related gameCenterLeaderboardsV2 returned (when they are included) + public static var gameCenterLeaderboardsV2: Relation { + .init(key: "limit[gameCenterLeaderboardsV2]") + } + /// maximum number of related gameCenterLeaderboards returned (when they are included) public static var gameCenterLeaderboards: Relation { .init(key: "limit[gameCenterLeaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift index 29cc4e31..1abb133e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift @@ -155,14 +155,26 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -183,10 +195,18 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -211,6 +231,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -227,10 +251,18 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdGameCenterLeaderboardSetsV2.GET.8d19527.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdGameCenterLeaderboardSetsV2.GET.8d19527.generated.swift new file mode 100644 index 00000000..91d81199 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdGameCenterLeaderboardSetsV2.GET.8d19527.generated.swift @@ -0,0 +1,552 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.GameCenterLeaderboardSetsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetsV2Response + + public var path: String { + "/v1/gameCenterDetails/\(id)/gameCenterLeaderboardSetsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboards]", + value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboardSets as `GameCenterLeaderboardSetsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.GameCenterLeaderboardSetsV2.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboards returned (when they are included) + public static var gameCenterLeaderboards: Relation { + .init(key: "limit[gameCenterLeaderboards]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift index 8af97514..f95556cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift @@ -133,6 +133,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -149,6 +153,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -213,6 +221,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -273,14 +285,26 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -301,10 +325,18 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -329,6 +361,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -345,10 +381,18 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardsV2/GameCenterDetailsByIdGameCenterLeaderboardsV2.GET.211bc70.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardsV2/GameCenterDetailsByIdGameCenterLeaderboardsV2.GET.211bc70.generated.swift new file mode 100644 index 00000000..a4279032 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardsV2/GameCenterDetailsByIdGameCenterLeaderboardsV2.GET.211bc70.generated.swift @@ -0,0 +1,705 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.GameCenterLeaderboardsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardsV2Response + + public var path: String { + "/v1/gameCenterDetails/\(id)/gameCenterLeaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboardSets]", + value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboards as `GameCenterLeaderboardsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.GameCenterLeaderboardsV2.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) + public static var gameCenterLeaderboardSets: Relation { + .init(key: "limit[gameCenterLeaderboardSets]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift index 90c47d10..41413067 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift @@ -143,14 +143,26 @@ extension V1.GameCenterDetails.ById.LeaderboardReleases.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -171,10 +183,18 @@ extension V1.GameCenterDetails.ById.LeaderboardReleases.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift index b85b84d6..210b1fbc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift @@ -143,14 +143,26 @@ extension V1.GameCenterDetails.ById.LeaderboardSetReleases.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -171,10 +183,18 @@ extension V1.GameCenterDetails.ById.LeaderboardSetReleases.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievementsV2/GameCenterDetailsByIdRelationshipsGameCenterAchievementsV2.GET.26acd52.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievementsV2/GameCenterDetailsByIdRelationshipsGameCenterAchievementsV2.GET.26acd52.generated.swift new file mode 100644 index 00000000..41d6b639 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievementsV2/GameCenterDetailsByIdRelationshipsGameCenterAchievementsV2.GET.26acd52.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievementsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterAchievementsV2LinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterAchievementsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterAchievementsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterAchievementsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievementsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievementsV2/GameCenterDetailsByIdRelationshipsGameCenterAchievementsV2.PATCH.26acd52.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievementsV2/GameCenterDetailsByIdRelationshipsGameCenterAchievementsV2.PATCH.26acd52.generated.swift new file mode 100644 index 00000000..25e7906f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievementsV2/GameCenterDetailsByIdRelationshipsGameCenterAchievementsV2.PATCH.26acd52.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievementsV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterDetailGameCenterAchievementsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterAchievementsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSetsV2.GET.068b82f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSetsV2.GET.068b82f.generated.swift new file mode 100644 index 00000000..132907c4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSetsV2.GET.068b82f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSetsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterLeaderboardSetsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSetsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSetsV2.PATCH.068b82f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSetsV2.PATCH.068b82f.generated.swift new file mode 100644 index 00000000..6d385275 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSetsV2.PATCH.068b82f.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSetsV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterDetailGameCenterLeaderboardSetsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterLeaderboardSetsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardsV2.GET.d263324.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardsV2.GET.d263324.generated.swift new file mode 100644 index 00000000..fb69561c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardsV2.GET.d263324.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterLeaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardsV2.PATCH.d263324.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardsV2.PATCH.d263324.generated.swift new file mode 100644 index 00000000..94381d87 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardsV2/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardsV2.PATCH.d263324.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardsV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterDetailGameCenterLeaderboardsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterLeaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift index af667d32..484e89ff 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift @@ -137,6 +137,10 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -169,6 +173,10 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift index 1a764989..fb822cd4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift @@ -251,6 +251,10 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -267,6 +271,10 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -343,14 +351,26 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -371,10 +391,18 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -399,6 +427,10 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -415,10 +447,18 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievementsV2/GameCenterGroupsByIdGameCenterAchievementsV2.GET.d9ef257.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievementsV2/GameCenterGroupsByIdGameCenterAchievementsV2.GET.d9ef257.generated.swift new file mode 100644 index 00000000..1377e3aa --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievementsV2/GameCenterGroupsByIdGameCenterAchievementsV2.GET.d9ef257.generated.swift @@ -0,0 +1,556 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.GameCenterAchievementsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementsV2Response + + public var path: String { + "/v1/gameCenterGroups/\(id)/gameCenterAchievementsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievements]", + value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterAchievements as `GameCenterAchievementsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.GameCenterAchievementsV2.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + /// the fields to include for returned resources of type gameCenterAchievements + public static var gameCenterAchievements: Relation<[GameCenterAchievements]?> { + .init(key: "fields[gameCenterAchievements]") + } + + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift index e0441b8e..114cab23 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift @@ -42,8 +42,12 @@ extension V1.GameCenterGroups.ById.GameCenterActivities { value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[achievementsV2]", + value: parameters.limit[.achievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[achievements]", value: parameters.limit[.achievements].map { "\($0)" }), + URLQueryItem(name: "limit[leaderboardsV2]", + value: parameters.limit[.leaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[leaderboards]", value: parameters.limit[.leaderboards].map { "\($0)" }), URLQueryItem(name: "limit[versions]", @@ -169,6 +173,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -185,6 +193,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -201,6 +213,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -317,14 +333,26 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -345,10 +373,18 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -373,6 +409,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -389,10 +429,18 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -489,6 +537,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -548,6 +600,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var gameCenterDetail: Self { .init(rawValue: "gameCenterDetail") } @@ -560,6 +616,10 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var versions: Self { .init(rawValue: "versions") } @@ -589,11 +649,21 @@ extension V1.GameCenterGroups.ById.GameCenterActivities.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related achievementsV2 returned (when they are included) + public static var achievementsV2: Relation { + .init(key: "limit[achievementsV2]") + } + /// maximum number of related achievements returned (when they are included) public static var achievements: Relation { .init(key: "limit[achievements]") } + /// maximum number of related leaderboardsV2 returned (when they are included) + public static var leaderboardsV2: Relation { + .init(key: "limit[leaderboardsV2]") + } + /// maximum number of related leaderboards returned (when they are included) public static var leaderboards: Relation { .init(key: "limit[leaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift index 8a776d95..107e58f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift @@ -175,6 +175,10 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -235,14 +239,26 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -263,10 +279,18 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -291,6 +315,10 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -307,10 +335,18 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -407,6 +443,10 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -501,6 +541,10 @@ extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var versions: Self { .init(rawValue: "versions") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift index d4ba036f..f2ad704e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift @@ -70,6 +70,8 @@ extension V1.GameCenterGroups.ById.GameCenterDetails { value: parameters.limit[.challengeReleases].map { "\($0)" }), URLQueryItem(name: "limit[challengesMinimumPlatformVersions]", value: parameters.limit[.challengesMinimumPlatformVersions].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterAchievementsV2]", + value: parameters.limit[.gameCenterAchievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterActivities]", @@ -78,8 +80,12 @@ extension V1.GameCenterGroups.ById.GameCenterDetails { value: parameters.limit[.gameCenterAppVersions].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterChallenges]", value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardSetsV2]", + value: parameters.limit[.gameCenterLeaderboardSetsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardsV2]", + value: parameters.limit[.gameCenterLeaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), URLQueryItem(name: "limit[leaderboardReleases]", @@ -285,6 +291,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -317,6 +327,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } @@ -569,6 +583,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -585,6 +603,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -601,6 +623,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -721,6 +747,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -781,14 +811,26 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -809,10 +851,18 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -837,6 +887,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -853,10 +907,18 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -953,6 +1015,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -1045,6 +1111,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -1191,14 +1261,26 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -1219,10 +1301,18 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -1276,6 +1366,11 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(key: "limit[challengesMinimumPlatformVersions]") } + /// maximum number of related gameCenterAchievementsV2 returned (when they are included) + public static var gameCenterAchievementsV2: Relation { + .init(key: "limit[gameCenterAchievementsV2]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") @@ -1296,11 +1391,21 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(key: "limit[gameCenterChallenges]") } + /// maximum number of related gameCenterLeaderboardSetsV2 returned (when they are included) + public static var gameCenterLeaderboardSetsV2: Relation { + .init(key: "limit[gameCenterLeaderboardSetsV2]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") } + /// maximum number of related gameCenterLeaderboardsV2 returned (when they are included) + public static var gameCenterLeaderboardsV2: Relation { + .init(key: "limit[gameCenterLeaderboardsV2]") + } + /// maximum number of related gameCenterLeaderboards returned (when they are included) public static var gameCenterLeaderboards: Relation { .init(key: "limit[gameCenterLeaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift index c69a1e9f..5e45347f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift @@ -44,6 +44,8 @@ extension V1.GameCenterGroups.ById { value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterAchievementsV2]", + value: parameters.limit[.gameCenterAchievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterActivities]", @@ -52,8 +54,12 @@ extension V1.GameCenterGroups.ById { value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterDetails]", value: parameters.limit[.gameCenterDetails].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardSetsV2]", + value: parameters.limit[.gameCenterLeaderboardSetsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardsV2]", + value: parameters.limit[.gameCenterLeaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }) ].filter { $0.value != nil } @@ -174,6 +180,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -190,6 +200,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -206,6 +220,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -270,6 +288,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -330,14 +352,26 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -358,10 +392,18 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -386,6 +428,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -402,10 +448,18 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -454,6 +508,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -546,6 +604,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -610,6 +672,10 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -626,10 +692,18 @@ extension V1.GameCenterGroups.ById.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public var description: String { rawValue } @@ -650,6 +724,11 @@ extension V1.GameCenterGroups.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related gameCenterAchievementsV2 returned (when they are included) + public static var gameCenterAchievementsV2: Relation { + .init(key: "limit[gameCenterAchievementsV2]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") @@ -670,11 +749,21 @@ extension V1.GameCenterGroups.ById.GET { .init(key: "limit[gameCenterDetails]") } + /// maximum number of related gameCenterLeaderboardSetsV2 returned (when they are included) + public static var gameCenterLeaderboardSetsV2: Relation { + .init(key: "limit[gameCenterLeaderboardSetsV2]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") } + /// maximum number of related gameCenterLeaderboardsV2 returned (when they are included) + public static var gameCenterLeaderboardsV2: Relation { + .init(key: "limit[gameCenterLeaderboardsV2]") + } + /// maximum number of related gameCenterLeaderboards returned (when they are included) public static var gameCenterLeaderboards: Relation { .init(key: "limit[gameCenterLeaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift index 49ac4622..f5a559de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift @@ -155,14 +155,26 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -183,10 +195,18 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -211,6 +231,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -227,10 +251,18 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdGameCenterLeaderboardSetsV2.GET.ce00fe5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdGameCenterLeaderboardSetsV2.GET.ce00fe5.generated.swift new file mode 100644 index 00000000..21785198 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdGameCenterLeaderboardSetsV2.GET.ce00fe5.generated.swift @@ -0,0 +1,552 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.GameCenterLeaderboardSetsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetsV2Response + + public var path: String { + "/v1/gameCenterGroups/\(id)/gameCenterLeaderboardSetsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboards]", + value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboardSets as `GameCenterLeaderboardSetsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.GameCenterLeaderboardSetsV2.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboards returned (when they are included) + public static var gameCenterLeaderboards: Relation { + .init(key: "limit[gameCenterLeaderboards]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift index a19a8b32..0aeb497d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift @@ -133,6 +133,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -149,6 +153,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -213,6 +221,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -273,14 +285,26 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -301,10 +325,18 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -329,6 +361,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -345,10 +381,18 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardsV2/GameCenterGroupsByIdGameCenterLeaderboardsV2.GET.5020c68.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardsV2/GameCenterGroupsByIdGameCenterLeaderboardsV2.GET.5020c68.generated.swift new file mode 100644 index 00000000..4c0393ca --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardsV2/GameCenterGroupsByIdGameCenterLeaderboardsV2.GET.5020c68.generated.swift @@ -0,0 +1,705 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.GameCenterLeaderboardsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardsV2Response + + public var path: String { + "/v1/gameCenterGroups/\(id)/gameCenterLeaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboardSets]", + value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboards as `GameCenterLeaderboardsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.GameCenterLeaderboardsV2.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) + public static var gameCenterLeaderboardSets: Relation { + .init(key: "limit[gameCenterLeaderboardSets]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievementsV2/GameCenterGroupsByIdRelationshipsGameCenterAchievementsV2.GET.39a3b96.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievementsV2/GameCenterGroupsByIdRelationshipsGameCenterAchievementsV2.GET.39a3b96.generated.swift new file mode 100644 index 00000000..4cc4ead4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievementsV2/GameCenterGroupsByIdRelationshipsGameCenterAchievementsV2.GET.39a3b96.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievementsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterGroupGameCenterAchievementsV2LinkagesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterAchievementsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterAchievementsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterGroupGameCenterAchievementsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievementsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievementsV2/GameCenterGroupsByIdRelationshipsGameCenterAchievementsV2.PATCH.39a3b96.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievementsV2/GameCenterGroupsByIdRelationshipsGameCenterAchievementsV2.PATCH.39a3b96.generated.swift new file mode 100644 index 00000000..a396d05b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievementsV2/GameCenterGroupsByIdRelationshipsGameCenterAchievementsV2.PATCH.39a3b96.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievementsV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterGroupGameCenterAchievementsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterAchievementsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSetsV2.GET.b88e6a3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSetsV2.GET.b88e6a3.generated.swift new file mode 100644 index 00000000..07268ae6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSetsV2.GET.b88e6a3.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSetsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterLeaderboardSetsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSetsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSetsV2.PATCH.b88e6a3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSetsV2.PATCH.b88e6a3.generated.swift new file mode 100644 index 00000000..e2b0a7be --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSetsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSetsV2.PATCH.b88e6a3.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSetsV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterGroupGameCenterLeaderboardSetsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterLeaderboardSetsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardsV2.GET.61a454a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardsV2.GET.61a454a.generated.swift new file mode 100644 index 00000000..7e3238fe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardsV2.GET.61a454a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardsV2 { + public struct GET: Endpoint { + public typealias Response = GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterLeaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardsV2.PATCH.61a454a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardsV2.PATCH.61a454a.generated.swift new file mode 100644 index 00000000..f8decfb2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardsV2/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardsV2.PATCH.61a454a.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardsV2 { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterGroupGameCenterLeaderboardsV2LinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterLeaderboardsV2" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift index bb9c9282..d8444add 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift @@ -43,6 +43,8 @@ extension V1.GameCenterGroups { value: parameters.filter[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterAchievementsV2]", + value: parameters.limit[.gameCenterAchievementsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterActivities]", @@ -51,8 +53,12 @@ extension V1.GameCenterGroups { value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterDetails]", value: parameters.limit[.gameCenterDetails].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardSetsV2]", + value: parameters.limit[.gameCenterLeaderboardSetsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterLeaderboardsV2]", + value: parameters.limit[.gameCenterLeaderboardsV2].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), URLQueryItem(name: "limit", @@ -174,6 +180,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -190,6 +200,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -206,6 +220,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -270,6 +288,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -330,14 +352,26 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -358,10 +392,18 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -386,6 +428,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -402,10 +448,18 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -454,6 +508,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public var description: String { rawValue } @@ -546,6 +604,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "vendorIdentifier") } + public static var versions: Self { + .init(rawValue: "versions") + } + public static var visibility: Self { .init(rawValue: "visibility") } @@ -632,6 +694,10 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -648,10 +714,18 @@ extension V1.GameCenterGroups.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public var description: String { rawValue } @@ -677,6 +751,11 @@ extension V1.GameCenterGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related gameCenterAchievementsV2 returned (when they are included) + public static var gameCenterAchievementsV2: Relation { + .init(key: "limit[gameCenterAchievementsV2]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") @@ -697,11 +776,21 @@ extension V1.GameCenterGroups.GET { .init(key: "limit[gameCenterDetails]") } + /// maximum number of related gameCenterLeaderboardSetsV2 returned (when they are included) + public static var gameCenterLeaderboardSetsV2: Relation { + .init(key: "limit[gameCenterLeaderboardSetsV2]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") } + /// maximum number of related gameCenterLeaderboardsV2 returned (when they are included) + public static var gameCenterLeaderboardsV2: Relation { + .init(key: "limit[gameCenterLeaderboardsV2]") + } + /// maximum number of related gameCenterLeaderboards returned (when they are included) public static var gameCenterLeaderboards: Relation { .init(key: "limit[gameCenterLeaderboards]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift index f5e9fca8..8cc0e6b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift @@ -122,6 +122,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -138,6 +142,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -202,6 +210,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -262,14 +274,26 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -290,10 +314,18 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -318,6 +350,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -334,10 +370,18 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift index 788709c2..1bfb8b09 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift @@ -146,14 +146,26 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -174,10 +186,18 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -202,6 +222,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -218,10 +242,18 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift index b67c5f1c..b4c6a1a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift @@ -133,6 +133,10 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -149,6 +153,10 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -213,6 +221,10 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -273,14 +285,26 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -301,10 +325,18 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -329,6 +361,10 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -345,10 +381,18 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift index 396e7c7f..19e7de8b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift @@ -147,14 +147,26 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -175,10 +187,18 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -203,6 +223,10 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -219,10 +243,18 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift index dafbf1a6..e39d36d6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift @@ -143,14 +143,26 @@ extension V1.GameCenterLeaderboardSets.ById.Releases.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -171,10 +183,18 @@ extension V1.GameCenterLeaderboardSets.ById.Releases.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift index acbbe977..211bbc80 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift @@ -123,6 +123,10 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "achievements") } + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + public static var archived: Self { .init(rawValue: "archived") } @@ -139,6 +143,10 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "leaderboards") } + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + public static var maximumPlayersCount: Self { .init(rawValue: "maximumPlayersCount") } @@ -203,6 +211,10 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "leaderboard") } + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } @@ -263,14 +275,26 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -291,10 +315,18 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } @@ -319,6 +351,10 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -335,10 +371,18 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var referenceName: Self { .init(rawValue: "referenceName") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift index 13bd082a..a5a2311a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift @@ -143,14 +143,26 @@ extension V1.GameCenterLeaderboards.ById.Releases.GET { .init(rawValue: "defaultGroupLeaderboard") } + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + public static var defaultLeaderboard: Self { .init(rawValue: "defaultLeaderboard") } + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + public static var gameCenterAchievements: Self { .init(rawValue: "gameCenterAchievements") } + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + public static var gameCenterActivities: Self { .init(rawValue: "gameCenterActivities") } @@ -171,10 +183,18 @@ extension V1.GameCenterLeaderboards.ById.Releases.GET { .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + public static var gameCenterLeaderboards: Self { .init(rawValue: "gameCenterLeaderboards") } + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + public static var leaderboardReleases: Self { .init(rawValue: "leaderboardReleases") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/ById/InAppPurchaseOfferCodeCustomCodesById.GET.b762498.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/ById/InAppPurchaseOfferCodeCustomCodesById.GET.b762498.generated.swift new file mode 100644 index 00000000..e206aef5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/ById/InAppPurchaseOfferCodeCustomCodesById.GET.b762498.generated.swift @@ -0,0 +1,174 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeCustomCodes.ById { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeCustomCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodeCustomCodes/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[inAppPurchaseOfferCodeCustomCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeCustomCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCodeCustomCode as `InAppPurchaseOfferCodeCustomCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeCustomCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodeCustomCodes.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InAppPurchaseOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type inAppPurchaseOfferCodeCustomCodes + public static var inAppPurchaseOfferCodeCustomCodes: Relation<[InAppPurchaseOfferCodeCustomCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeCustomCodes]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/ById/InAppPurchaseOfferCodeCustomCodesById.PATCH.b762498.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/ById/InAppPurchaseOfferCodeCustomCodesById.PATCH.b762498.generated.swift new file mode 100644 index 00000000..8d64aeae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/ById/InAppPurchaseOfferCodeCustomCodesById.PATCH.b762498.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeCustomCodes.ById { + public struct PATCH: Endpoint { + public typealias Parameters = InAppPurchaseOfferCodeCustomCodeUpdateRequest + public typealias Response = InAppPurchaseOfferCodeCustomCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodeCustomCodes/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// InAppPurchaseOfferCodeCustomCode representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCodeCustomCode as `InAppPurchaseOfferCodeCustomCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeCustomCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/InAppPurchaseOfferCodeCustomCodes.POST.ac4891a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/InAppPurchaseOfferCodeCustomCodes.POST.ac4891a.generated.swift new file mode 100644 index 00000000..138a0f53 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeCustomCodes/InAppPurchaseOfferCodeCustomCodes.POST.ac4891a.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeCustomCodes { + public struct POST: Endpoint { + public typealias Parameters = InAppPurchaseOfferCodeCustomCodeCreateRequest + public typealias Response = InAppPurchaseOfferCodeCustomCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodeCustomCodes" + } + + /// InAppPurchaseOfferCodeCustomCode representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single InAppPurchaseOfferCodeCustomCode as `InAppPurchaseOfferCodeCustomCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(InAppPurchaseOfferCodeCustomCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/InAppPurchaseOfferCodeOneTimeUseCodesById.GET.b4309a0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/InAppPurchaseOfferCodeOneTimeUseCodesById.GET.b4309a0.generated.swift new file mode 100644 index 00000000..36b11986 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/InAppPurchaseOfferCodeOneTimeUseCodesById.GET.b4309a0.generated.swift @@ -0,0 +1,178 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeOneTimeUseCodes.ById { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeOneTimeUseCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodeOneTimeUseCodes/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeOneTimeUseCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCodeOneTimeUseCode as `InAppPurchaseOfferCodeOneTimeUseCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeOneTimeUseCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodeOneTimeUseCodes.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InAppPurchaseOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var environment: Self { + .init(rawValue: "environment") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var values: Self { + .init(rawValue: "values") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type inAppPurchaseOfferCodeOneTimeUseCodes + public static var inAppPurchaseOfferCodeOneTimeUseCodes: Relation<[InAppPurchaseOfferCodeOneTimeUseCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/InAppPurchaseOfferCodeOneTimeUseCodesById.PATCH.b4309a0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/InAppPurchaseOfferCodeOneTimeUseCodesById.PATCH.b4309a0.generated.swift new file mode 100644 index 00000000..57cb8b33 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/InAppPurchaseOfferCodeOneTimeUseCodesById.PATCH.b4309a0.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeOneTimeUseCodes.ById { + public struct PATCH: Endpoint { + public typealias Parameters = InAppPurchaseOfferCodeOneTimeUseCodeUpdateRequest + public typealias Response = InAppPurchaseOfferCodeOneTimeUseCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodeOneTimeUseCodes/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// InAppPurchaseOfferCodeOneTimeUseCode representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCodeOneTimeUseCode as `InAppPurchaseOfferCodeOneTimeUseCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeOneTimeUseCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/Values/InAppPurchaseOfferCodeOneTimeUseCodesByIdValues.GET.707eb5e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/Values/InAppPurchaseOfferCodeOneTimeUseCodesByIdValues.GET.707eb5e.generated.swift new file mode 100644 index 00000000..61be7938 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/ById/Values/InAppPurchaseOfferCodeOneTimeUseCodesByIdValues.GET.707eb5e.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeOneTimeUseCodes.ById.Values { + public struct GET: Endpoint { + public typealias Response = String + + public var path: String { + "/v1/inAppPurchaseOfferCodeOneTimeUseCodes/\(id)/values" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCodeOneTimeUseCodeValue as `String` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return String(data: data, encoding: .utf8) ?? "" + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodeOneTimeUseCodes.ById.Values.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/InAppPurchaseOfferCodeOneTimeUseCodes.POST.10dff7e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/InAppPurchaseOfferCodeOneTimeUseCodes.POST.10dff7e.generated.swift new file mode 100644 index 00000000..41413263 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodeOneTimeUseCodes/InAppPurchaseOfferCodeOneTimeUseCodes.POST.10dff7e.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodeOneTimeUseCodes { + public struct POST: Endpoint { + public typealias Parameters = InAppPurchaseOfferCodeOneTimeUseCodeCreateRequest + public typealias Response = InAppPurchaseOfferCodeOneTimeUseCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodeOneTimeUseCodes" + } + + /// InAppPurchaseOfferCodeOneTimeUseCode representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single InAppPurchaseOfferCodeOneTimeUseCode as `InAppPurchaseOfferCodeOneTimeUseCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(InAppPurchaseOfferCodeOneTimeUseCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/CustomCodes/InAppPurchaseOfferCodesByIdCustomCodes.GET.6c59819.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/CustomCodes/InAppPurchaseOfferCodesByIdCustomCodes.GET.6c59819.generated.swift new file mode 100644 index 00000000..bce1de4e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/CustomCodes/InAppPurchaseOfferCodesByIdCustomCodes.GET.6c59819.generated.swift @@ -0,0 +1,218 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById.CustomCodes { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeCustomCodesResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)/customCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[actors]", + value: parameters.fields[.actors]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodeCustomCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeCustomCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of InAppPurchaseOfferCodeCustomCodes as `InAppPurchaseOfferCodeCustomCodesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeCustomCodesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.CustomCodes.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Actors: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actorType: Self { + .init(rawValue: "actorType") + } + + public static var apiKeyId: Self { + .init(rawValue: "apiKeyId") + } + + public static var userEmail: Self { + .init(rawValue: "userEmail") + } + + public static var userFirstName: Self { + .init(rawValue: "userFirstName") + } + + public static var userLastName: Self { + .init(rawValue: "userLastName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type actors + public static var actors: Relation<[Actors]?> { + .init(key: "fields[actors]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferCodeCustomCodes + public static var inAppPurchaseOfferCodeCustomCodes: Relation<[InAppPurchaseOfferCodeCustomCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeCustomCodes]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/InAppPurchaseOfferCodesById.GET.7250fc2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/InAppPurchaseOfferCodesById.GET.7250fc2.generated.swift new file mode 100644 index 00000000..b7dcde80 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/InAppPurchaseOfferCodesById.GET.7250fc2.generated.swift @@ -0,0 +1,347 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[inAppPurchaseOfferCodeCustomCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeCustomCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeOneTimeUseCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodes]", + value: parameters.fields[.inAppPurchaseOfferCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferPrices]", + value: parameters.fields[.inAppPurchaseOfferPrices]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[customCodes]", + value: parameters.limit[.customCodes].map { "\($0)" }), + URLQueryItem(name: "limit[oneTimeUseCodes]", + value: parameters.limit[.oneTimeUseCodes].map { "\($0)" }), + URLQueryItem(name: "limit[prices]", + value: parameters.limit[.prices].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCode as `InAppPurchaseOfferCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InAppPurchaseOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var environment: Self { + .init(rawValue: "environment") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var values: Self { + .init(rawValue: "values") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var pricePoint: Self { + .init(rawValue: "pricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type inAppPurchaseOfferCodeCustomCodes + public static var inAppPurchaseOfferCodeCustomCodes: Relation<[InAppPurchaseOfferCodeCustomCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeCustomCodes]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferCodeOneTimeUseCodes + public static var inAppPurchaseOfferCodeOneTimeUseCodes: Relation<[InAppPurchaseOfferCodeOneTimeUseCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferCodes + public static var inAppPurchaseOfferCodes: Relation<[InAppPurchaseOfferCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodes]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferPrices + public static var inAppPurchaseOfferPrices: Relation<[InAppPurchaseOfferPrices]?> { + .init(key: "fields[inAppPurchaseOfferPrices]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related customCodes returned (when they are included) + public static var customCodes: Relation { + .init(key: "limit[customCodes]") + } + + /// maximum number of related oneTimeUseCodes returned (when they are included) + public static var oneTimeUseCodes: Relation { + .init(key: "limit[oneTimeUseCodes]") + } + + /// maximum number of related prices returned (when they are included) + public static var prices: Relation { + .init(key: "limit[prices]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/InAppPurchaseOfferCodesById.PATCH.7250fc2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/InAppPurchaseOfferCodesById.PATCH.7250fc2.generated.swift new file mode 100644 index 00000000..790fb35b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/InAppPurchaseOfferCodesById.PATCH.7250fc2.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById { + public struct PATCH: Endpoint { + public typealias Parameters = InAppPurchaseOfferCodeUpdateRequest + public typealias Response = InAppPurchaseOfferCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// InAppPurchaseOfferCode representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseOfferCode as `InAppPurchaseOfferCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/OneTimeUseCodes/InAppPurchaseOfferCodesByIdOneTimeUseCodes.GET.39dbe79.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/OneTimeUseCodes/InAppPurchaseOfferCodesByIdOneTimeUseCodes.GET.39dbe79.generated.swift new file mode 100644 index 00000000..36272353 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/OneTimeUseCodes/InAppPurchaseOfferCodesByIdOneTimeUseCodes.GET.39dbe79.generated.swift @@ -0,0 +1,222 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById.OneTimeUseCodes { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeOneTimeUseCodesResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)/oneTimeUseCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[actors]", + value: parameters.fields[.actors]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeOneTimeUseCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of InAppPurchaseOfferCodeOneTimeUseCodes as `InAppPurchaseOfferCodeOneTimeUseCodesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeOneTimeUseCodesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.OneTimeUseCodes.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Actors: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actorType: Self { + .init(rawValue: "actorType") + } + + public static var apiKeyId: Self { + .init(rawValue: "apiKeyId") + } + + public static var userEmail: Self { + .init(rawValue: "userEmail") + } + + public static var userFirstName: Self { + .init(rawValue: "userFirstName") + } + + public static var userLastName: Self { + .init(rawValue: "userLastName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var environment: Self { + .init(rawValue: "environment") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var values: Self { + .init(rawValue: "values") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type actors + public static var actors: Relation<[Actors]?> { + .init(key: "fields[actors]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferCodeOneTimeUseCodes + public static var inAppPurchaseOfferCodeOneTimeUseCodes: Relation<[InAppPurchaseOfferCodeOneTimeUseCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Prices/InAppPurchaseOfferCodesByIdPrices.GET.de4dff6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Prices/InAppPurchaseOfferCodesByIdPrices.GET.de4dff6.generated.swift new file mode 100644 index 00000000..8a21f563 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Prices/InAppPurchaseOfferCodesByIdPrices.GET.de4dff6.generated.swift @@ -0,0 +1,243 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById.Prices { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferPricesResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)/prices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[inAppPurchaseOfferPrices]", + value: parameters.fields[.inAppPurchaseOfferPrices]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchasePricePoints]", + value: parameters.fields[.inAppPurchasePricePoints]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[territories]", + value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[territory]", + value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of InAppPurchaseOfferPrices as `InAppPurchaseOfferPricesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferPricesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.Prices.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InAppPurchaseOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var pricePoint: Self { + .init(rawValue: "pricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type inAppPurchaseOfferPrices + public static var inAppPurchaseOfferPrices: Relation<[InAppPurchaseOfferPrices]?> { + .init(key: "fields[inAppPurchaseOfferPrices]") + } + + /// the fields to include for returned resources of type inAppPurchasePricePoints + public static var inAppPurchasePricePoints: Relation<[InAppPurchasePricePoints]?> { + .init(key: "fields[inAppPurchasePricePoints]") + } + + /// the fields to include for returned resources of type territories + public static var territories: Relation<[Territories]?> { + .init(key: "fields[territories]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by id(s) of related 'territory' + public static var territory: Relation<[String]?> { + .init(key: "filter[territory]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var pricePoint: Self { + .init(rawValue: "pricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/CustomCodes/InAppPurchaseOfferCodesByIdRelationshipsCustomCodes.GET.d2d2f62.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/CustomCodes/InAppPurchaseOfferCodesByIdRelationshipsCustomCodes.GET.d2d2f62.generated.swift new file mode 100644 index 00000000..bf320d42 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/CustomCodes/InAppPurchaseOfferCodesByIdRelationshipsCustomCodes.GET.d2d2f62.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById.Relationships.CustomCodes { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeCustomCodesLinkagesResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)/relationships/customCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseOfferCodeCustomCodesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeCustomCodesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.Relationships.CustomCodes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/OneTimeUseCodes/InAppPurchaseOfferCodesByIdRelationshipsOneTimeUseCodes.GET.a17fe21.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/OneTimeUseCodes/InAppPurchaseOfferCodesByIdRelationshipsOneTimeUseCodes.GET.a17fe21.generated.swift new file mode 100644 index 00000000..f401813b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/OneTimeUseCodes/InAppPurchaseOfferCodesByIdRelationshipsOneTimeUseCodes.GET.a17fe21.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById.Relationships.OneTimeUseCodes { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)/relationships/oneTimeUseCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.Relationships.OneTimeUseCodes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/Prices/InAppPurchaseOfferCodesByIdRelationshipsPrices.GET.0040f70.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/Prices/InAppPurchaseOfferCodesByIdRelationshipsPrices.GET.0040f70.generated.swift new file mode 100644 index 00000000..b3e2eeaf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/ById/Relationships/Prices/InAppPurchaseOfferCodesByIdRelationshipsPrices.GET.0040f70.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes.ById.Relationships.Prices { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodePricesLinkagesResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes/\(id)/relationships/prices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseOfferCodePricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodePricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseOfferCodes.ById.Relationships.Prices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/InAppPurchaseOfferCodes.POST.bd85607.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/InAppPurchaseOfferCodes.POST.bd85607.generated.swift new file mode 100644 index 00000000..3083ee02 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseOfferCodes/InAppPurchaseOfferCodes.POST.bd85607.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseOfferCodes { + public struct POST: Endpoint { + public typealias Parameters = InAppPurchaseOfferCodeCreateRequest + public typealias Response = InAppPurchaseOfferCodeResponse + + public var path: String { + "/v1/inAppPurchaseOfferCodes" + } + + /// InAppPurchaseOfferCode representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single InAppPurchaseOfferCode as `InAppPurchaseOfferCodeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(InAppPurchaseOfferCodeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift index 0313843c..35ad7c08 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift @@ -107,6 +107,10 @@ extension V1.PreReleaseVersions.ById.App.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -139,6 +143,10 @@ extension V1.PreReleaseVersions.ById.App.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift index 5732bb4c..338ed601 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift @@ -120,6 +120,10 @@ extension V1.PreReleaseVersions.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -152,6 +156,10 @@ extension V1.PreReleaseVersions.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift index 75815e0a..fa11403b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift @@ -139,6 +139,10 @@ extension V1.PreReleaseVersions.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -171,6 +175,10 @@ extension V1.PreReleaseVersions.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift index a5390443..28bc3bff 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift @@ -38,6 +38,16 @@ extension V1.ReviewSubmissions.ById.Items { value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[backgroundAssetVersions]", value: parameters.fields[.backgroundAssetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[reviewSubmissionItems]", value: parameters.fields[.reviewSubmissionItems]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -411,6 +421,170 @@ extension V1.ReviewSubmissions.ById.Items.GET { .init(rawValue: "state") } + public static var stateDetails: Self { + .init(rawValue: "stateDetails") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + public static var version: Self { .init(rawValue: "version") } @@ -451,6 +625,26 @@ extension V1.ReviewSubmissions.ById.Items.GET { .init(rawValue: "backgroundAssetVersion") } + public static var gameCenterAchievementVersion: Self { + .init(rawValue: "gameCenterAchievementVersion") + } + + public static var gameCenterActivityVersion: Self { + .init(rawValue: "gameCenterActivityVersion") + } + + public static var gameCenterChallengeVersion: Self { + .init(rawValue: "gameCenterChallengeVersion") + } + + public static var gameCenterLeaderboardSetVersion: Self { + .init(rawValue: "gameCenterLeaderboardSetVersion") + } + + public static var gameCenterLeaderboardVersion: Self { + .init(rawValue: "gameCenterLeaderboardVersion") + } + public static var state: Self { .init(rawValue: "state") } @@ -492,6 +686,31 @@ extension V1.ReviewSubmissions.ById.Items.GET { .init(key: "fields[backgroundAssetVersions]") } + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + /// the fields to include for returned resources of type reviewSubmissionItems public static var reviewSubmissionItems: Relation<[ReviewSubmissionItems]?> { .init(key: "fields[reviewSubmissionItems]") @@ -530,6 +749,26 @@ extension V1.ReviewSubmissions.ById.Items.GET { .init(rawValue: "backgroundAssetVersion") } + public static var gameCenterAchievementVersion: Self { + .init(rawValue: "gameCenterAchievementVersion") + } + + public static var gameCenterActivityVersion: Self { + .init(rawValue: "gameCenterActivityVersion") + } + + public static var gameCenterChallengeVersion: Self { + .init(rawValue: "gameCenterChallengeVersion") + } + + public static var gameCenterLeaderboardSetVersion: Self { + .init(rawValue: "gameCenterLeaderboardSetVersion") + } + + public static var gameCenterLeaderboardVersion: Self { + .init(rawValue: "gameCenterLeaderboardVersion") + } + public var description: String { rawValue } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift index b8abda2c..f349f3ec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift @@ -126,6 +126,26 @@ extension V1.ReviewSubmissions.ById.GET { .init(rawValue: "backgroundAssetVersion") } + public static var gameCenterAchievementVersion: Self { + .init(rawValue: "gameCenterAchievementVersion") + } + + public static var gameCenterActivityVersion: Self { + .init(rawValue: "gameCenterActivityVersion") + } + + public static var gameCenterChallengeVersion: Self { + .init(rawValue: "gameCenterChallengeVersion") + } + + public static var gameCenterLeaderboardSetVersion: Self { + .init(rawValue: "gameCenterLeaderboardSetVersion") + } + + public static var gameCenterLeaderboardVersion: Self { + .init(rawValue: "gameCenterLeaderboardVersion") + } + public static var state: Self { .init(rawValue: "state") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift index 52ec691b..9b1596b8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift @@ -130,6 +130,26 @@ extension V1.ReviewSubmissions.GET { .init(rawValue: "backgroundAssetVersion") } + public static var gameCenterAchievementVersion: Self { + .init(rawValue: "gameCenterAchievementVersion") + } + + public static var gameCenterActivityVersion: Self { + .init(rawValue: "gameCenterActivityVersion") + } + + public static var gameCenterChallengeVersion: Self { + .init(rawValue: "gameCenterChallengeVersion") + } + + public static var gameCenterLeaderboardSetVersion: Self { + .init(rawValue: "gameCenterLeaderboardSetVersion") + } + + public static var gameCenterLeaderboardVersion: Self { + .init(rawValue: "gameCenterLeaderboardVersion") + } + public static var state: Self { .init(rawValue: "state") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift index 51e5c882..01a8b87e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift @@ -398,6 +398,10 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { .init(rawValue: "active") } + public static var autoRenewEnabled: Self { + .init(rawValue: "autoRenewEnabled") + } + public static var customCodes: Self { .init(rawValue: "customCodes") } @@ -434,6 +438,14 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { .init(rawValue: "prices") } + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + public static var subscription: Self { .init(rawValue: "subscription") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift index 0419acaa..7ac7b6d4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift @@ -104,6 +104,10 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById.GET { .init(rawValue: "createdDate") } + public static var environment: Self { + .init(rawValue: "environment") + } + public static var expirationDate: Self { .init(rawValue: "expirationDate") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift index 2a830631..25a5f3b3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift @@ -143,6 +143,10 @@ extension V1.SubscriptionOfferCodes.ById.CustomCodes.GET { .init(rawValue: "active") } + public static var autoRenewEnabled: Self { + .init(rawValue: "autoRenewEnabled") + } + public static var customCodes: Self { .init(rawValue: "customCodes") } @@ -179,6 +183,14 @@ extension V1.SubscriptionOfferCodes.ById.CustomCodes.GET { .init(rawValue: "prices") } + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + public static var subscription: Self { .init(rawValue: "subscription") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift index 42accc23..016e6be1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift @@ -111,6 +111,10 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes.GET { .init(rawValue: "createdDate") } + public static var environment: Self { + .init(rawValue: "environment") + } + public static var expirationDate: Self { .init(rawValue: "expirationDate") } @@ -143,6 +147,10 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes.GET { .init(rawValue: "active") } + public static var autoRenewEnabled: Self { + .init(rawValue: "autoRenewEnabled") + } + public static var customCodes: Self { .init(rawValue: "customCodes") } @@ -179,6 +187,14 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes.GET { .init(rawValue: "prices") } + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + public static var subscription: Self { .init(rawValue: "subscription") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift index 6c40d739..37947581 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift @@ -154,6 +154,10 @@ extension V1.SubscriptionOfferCodes.ById.GET { .init(rawValue: "createdDate") } + public static var environment: Self { + .init(rawValue: "environment") + } + public static var expirationDate: Self { .init(rawValue: "expirationDate") } @@ -206,6 +210,10 @@ extension V1.SubscriptionOfferCodes.ById.GET { .init(rawValue: "active") } + public static var autoRenewEnabled: Self { + .init(rawValue: "autoRenewEnabled") + } + public static var customCodes: Self { .init(rawValue: "customCodes") } @@ -242,6 +250,14 @@ extension V1.SubscriptionOfferCodes.ById.GET { .init(rawValue: "prices") } + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + public static var subscription: Self { .init(rawValue: "subscription") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift index 3b022963..29801958 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift @@ -163,6 +163,10 @@ extension V1.Subscriptions.ById.OfferCodes.GET { .init(rawValue: "createdDate") } + public static var environment: Self { + .init(rawValue: "environment") + } + public static var expirationDate: Self { .init(rawValue: "expirationDate") } @@ -215,6 +219,10 @@ extension V1.Subscriptions.ById.OfferCodes.GET { .init(rawValue: "active") } + public static var autoRenewEnabled: Self { + .init(rawValue: "autoRenewEnabled") + } + public static var customCodes: Self { .init(rawValue: "customCodes") } @@ -251,6 +259,14 @@ extension V1.Subscriptions.ById.OfferCodes.GET { .init(rawValue: "prices") } + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + public static var subscription: Self { .init(rawValue: "subscription") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift index f12bb354..c19be716 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift @@ -140,6 +140,10 @@ extension V1.Subscriptions.ById.PromotedPurchase.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift index 532afc4f..d00e1a84 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift @@ -356,6 +356,10 @@ extension V1.Subscriptions.ById.GET { .init(rawValue: "active") } + public static var autoRenewEnabled: Self { + .init(rawValue: "autoRenewEnabled") + } + public static var customCodes: Self { .init(rawValue: "customCodes") } @@ -392,6 +396,14 @@ extension V1.Subscriptions.ById.GET { .init(rawValue: "prices") } + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + public static var subscription: Self { .init(rawValue: "subscription") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift index 5ef87426..bf8d363b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift @@ -118,6 +118,10 @@ extension V1.UserInvitations.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -150,6 +154,10 @@ extension V1.UserInvitations.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift index 35d68762..96619fcf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift @@ -112,6 +112,10 @@ extension V1.UserInvitations.ById.VisibleApps.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -144,6 +148,10 @@ extension V1.UserInvitations.ById.VisibleApps.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift index f5480d5f..d7429d21 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift @@ -127,6 +127,10 @@ extension V1.UserInvitations.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -159,6 +163,10 @@ extension V1.UserInvitations.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift index 4971caf6..ade50276 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift @@ -118,6 +118,10 @@ extension V1.Users.ById.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -150,6 +154,10 @@ extension V1.Users.ById.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift index 7dba7917..33fd515d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift @@ -112,6 +112,10 @@ extension V1.Users.ById.VisibleApps.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -144,6 +148,10 @@ extension V1.Users.ById.VisibleApps.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift index 2ef6694d..2abbb729 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift @@ -127,6 +127,10 @@ extension V1.Users.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -159,6 +163,10 @@ extension V1.Users.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.ceb4af8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.ceb4af8.generated.swift new file mode 100644 index 00000000..fec0ae87 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.ceb4af8.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterAchievementImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.ceb4af8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.ceb4af8.generated.swift new file mode 100644 index 00000000..153f6a73 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.ceb4af8.generated.swift @@ -0,0 +1,166 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementImages.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementImageV2Response + + public var path: String { + "/v2/gameCenterAchievementImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementImages]", + value: parameters.fields[.gameCenterAchievementImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievementImage as `GameCenterAchievementImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementImages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementImages + public static var gameCenterAchievementImages: Relation<[GameCenterAchievementImages]?> { + .init(key: "fields[gameCenterAchievementImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localization: Self { + .init(rawValue: "localization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.ceb4af8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.ceb4af8.generated.swift new file mode 100644 index 00000000..385091c5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.ceb4af8.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterAchievementImageV2UpdateRequest + public typealias Response = GameCenterAchievementImageV2Response + + public var path: String { + "/v2/gameCenterAchievementImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterAchievementImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievementImage as `GameCenterAchievementImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/GameCenterAchievementImages.POST.0509565.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/GameCenterAchievementImages.POST.0509565.generated.swift new file mode 100644 index 00000000..a6d0f71e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementImages/GameCenterAchievementImages.POST.0509565.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementImages { + public struct POST: Endpoint { + public typealias Parameters = GameCenterAchievementImageV2CreateRequest + public typealias Response = GameCenterAchievementImageV2Response + + public var path: String { + "/v2/gameCenterAchievementImages" + } + + /// GameCenterAchievementImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterAchievementImage as `GameCenterAchievementImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterAchievementImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.b8a2a32.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.b8a2a32.generated.swift new file mode 100644 index 00000000..af1173a5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.b8a2a32.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementLocalizations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterAchievementLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.b8a2a32.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.b8a2a32.generated.swift new file mode 100644 index 00000000..0ce2e0b6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.b8a2a32.generated.swift @@ -0,0 +1,213 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementLocalizations.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementLocalizationV2Response + + public var path: String { + "/v2/gameCenterAchievementLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementImages]", + value: parameters.fields[.gameCenterAchievementImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementLocalizations]", + value: parameters.fields[.gameCenterAchievementLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievementLocalization as `GameCenterAchievementLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementLocalizations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementImages + public static var gameCenterAchievementImages: Relation<[GameCenterAchievementImages]?> { + .init(key: "fields[gameCenterAchievementImages]") + } + + /// the fields to include for returned resources of type gameCenterAchievementLocalizations + public static var gameCenterAchievementLocalizations: Relation<[GameCenterAchievementLocalizations]?> { + .init(key: "fields[gameCenterAchievementLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.b8a2a32.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.b8a2a32.generated.swift new file mode 100644 index 00000000..30ea2811 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.b8a2a32.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementLocalizations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterAchievementLocalizationV2UpdateRequest + public typealias Response = GameCenterAchievementLocalizationV2Response + + public var path: String { + "/v2/gameCenterAchievementLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterAchievementLocalization representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievementLocalization as `GameCenterAchievementLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/Image/GameCenterAchievementLocalizationsByIdImage.GET.fac7b2d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/Image/GameCenterAchievementLocalizationsByIdImage.GET.fac7b2d.generated.swift new file mode 100644 index 00000000..cfe0959d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/Image/GameCenterAchievementLocalizationsByIdImage.GET.fac7b2d.generated.swift @@ -0,0 +1,209 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementLocalizations.ById.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementImageV2Response + + public var path: String { + "/v2/gameCenterAchievementLocalizations/\(id)/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementImages]", + value: parameters.fields[.gameCenterAchievementImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementLocalizations]", + value: parameters.fields[.gameCenterAchievementLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievementImage as `GameCenterAchievementImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementLocalizations.ById.Image.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementImages + public static var gameCenterAchievementImages: Relation<[GameCenterAchievementImages]?> { + .init(key: "fields[gameCenterAchievementImages]") + } + + /// the fields to include for returned resources of type gameCenterAchievementLocalizations + public static var gameCenterAchievementLocalizations: Relation<[GameCenterAchievementLocalizations]?> { + .init(key: "fields[gameCenterAchievementLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localization: Self { + .init(rawValue: "localization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/Relationships/Image/GameCenterAchievementLocalizationsByIdRelationshipsImage.GET.eb708be.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/Relationships/Image/GameCenterAchievementLocalizationsByIdRelationshipsImage.GET.eb708be.generated.swift new file mode 100644 index 00000000..ec548592 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/ById/Relationships/Image/GameCenterAchievementLocalizationsByIdRelationshipsImage.GET.eb708be.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementLocalizations.ById.Relationships.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementLocalizationV2ImageLinkageResponse + + public var path: String { + "/v2/gameCenterAchievementLocalizations/\(id)/relationships/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterAchievementLocalizationV2ImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationV2ImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementLocalizations.ById.Relationships.Image.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.0688823.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.0688823.generated.swift new file mode 100644 index 00000000..82111b38 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.0688823.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementLocalizations { + public struct POST: Endpoint { + public typealias Parameters = GameCenterAchievementLocalizationV2CreateRequest + public typealias Response = GameCenterAchievementLocalizationV2Response + + public var path: String { + "/v2/gameCenterAchievementLocalizations" + } + + /// GameCenterAchievementLocalization representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterAchievementLocalization as `GameCenterAchievementLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterAchievementLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/GameCenterAchievementVersionsById.GET.f3597fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/GameCenterAchievementVersionsById.GET.f3597fe.generated.swift new file mode 100644 index 00000000..2edc4d24 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/GameCenterAchievementVersionsById.GET.f3597fe.generated.swift @@ -0,0 +1,231 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementVersions.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementVersionV2Response + + public var path: String { + "/v2/gameCenterAchievementVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementLocalizations]", + value: parameters.fields[.gameCenterAchievementLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievementVersion as `GameCenterAchievementVersionV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementVersionV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementVersions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementLocalizations + public static var gameCenterAchievementLocalizations: Relation<[GameCenterAchievementLocalizations]?> { + .init(key: "fields[gameCenterAchievementLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/Localizations/GameCenterAchievementVersionsByIdLocalizations.GET.5a57179.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/Localizations/GameCenterAchievementVersionsByIdLocalizations.GET.5a57179.generated.swift new file mode 100644 index 00000000..b379aa22 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/Localizations/GameCenterAchievementVersionsByIdLocalizations.GET.5a57179.generated.swift @@ -0,0 +1,253 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementVersions.ById.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementLocalizationsV2Response + + public var path: String { + "/v2/gameCenterAchievementVersions/\(id)/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementImages]", + value: parameters.fields[.gameCenterAchievementImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementLocalizations]", + value: parameters.fields[.gameCenterAchievementLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterAchievementLocalizations as `GameCenterAchievementLocalizationsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementVersions.ById.Localizations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementImages + public static var gameCenterAchievementImages: Relation<[GameCenterAchievementImages]?> { + .init(key: "fields[gameCenterAchievementImages]") + } + + /// the fields to include for returned resources of type gameCenterAchievementLocalizations + public static var gameCenterAchievementLocalizations: Relation<[GameCenterAchievementLocalizations]?> { + .init(key: "fields[gameCenterAchievementLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/Relationships/Localizations/GameCenterAchievementVersionsByIdRelationshipsLocalizations.GET.d4d48bd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/Relationships/Localizations/GameCenterAchievementVersionsByIdRelationshipsLocalizations.GET.d4d48bd.generated.swift new file mode 100644 index 00000000..e43507c8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/ById/Relationships/Localizations/GameCenterAchievementVersionsByIdRelationshipsLocalizations.GET.d4d48bd.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementVersions.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementVersionV2LocalizationsLinkagesResponse + + public var path: String { + "/v2/gameCenterAchievementVersions/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterAchievementVersionV2LocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementVersionV2LocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievementVersions.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/GameCenterAchievementVersions.POST.a81bb07.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/GameCenterAchievementVersions.POST.a81bb07.generated.swift new file mode 100644 index 00000000..bf0140b5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievementVersions/GameCenterAchievementVersions.POST.a81bb07.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievementVersions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterAchievementVersionV2CreateRequest + public typealias Response = GameCenterAchievementVersionV2Response + + public var path: String { + "/v2/gameCenterAchievementVersions" + } + + /// GameCenterAchievementVersion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterAchievementVersion as `GameCenterAchievementVersionV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterAchievementVersionV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.8acf8fa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.8acf8fa.generated.swift new file mode 100644 index 00000000..2066a30c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.8acf8fa.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterAchievements/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.GET.8acf8fa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.GET.8acf8fa.generated.swift new file mode 100644 index 00000000..5b9e55cd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.GET.8acf8fa.generated.swift @@ -0,0 +1,259 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementV2Response + + public var path: String { + "/v2/gameCenterAchievements/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievements]", + value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievement as `GameCenterAchievementV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievements.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + /// the fields to include for returned resources of type gameCenterAchievements + public static var gameCenterAchievements: Relation<[GameCenterAchievements]?> { + .init(key: "fields[gameCenterAchievements]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.8acf8fa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.8acf8fa.generated.swift new file mode 100644 index 00000000..fd62d511 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.8acf8fa.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterAchievementV2UpdateRequest + public typealias Response = GameCenterAchievementV2Response + + public var path: String { + "/v2/gameCenterAchievements/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterAchievement representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAchievement as `GameCenterAchievementV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.a5f26d0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.a5f26d0.generated.swift new file mode 100644 index 00000000..52c5b00d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.a5f26d0.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements.ById.Relationships.Activity { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterAchievementV2ActivityLinkageRequest + public typealias Response = Void + + public var path: String { + "/v2/gameCenterAchievements/\(id)/relationships/activity" + } + + /// the id of the requested resource + public var id: String + + /// Related linkage + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Relationships/Versions/GameCenterAchievementsByIdRelationshipsVersions.GET.5cc0452.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Relationships/Versions/GameCenterAchievementsByIdRelationshipsVersions.GET.5cc0452.generated.swift new file mode 100644 index 00000000..55aefab1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Relationships/Versions/GameCenterAchievementsByIdRelationshipsVersions.GET.5cc0452.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementV2VersionsLinkagesResponse + + public var path: String { + "/v2/gameCenterAchievements/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterAchievementV2VersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementV2VersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievements.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Versions/GameCenterAchievementsByIdVersions.GET.eab1915.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Versions/GameCenterAchievementsByIdVersions.GET.eab1915.generated.swift new file mode 100644 index 00000000..6d1f1984 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/ById/Versions/GameCenterAchievementsByIdVersions.GET.eab1915.generated.swift @@ -0,0 +1,302 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements.ById.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementVersionsV2Response + + public var path: String { + "/v2/gameCenterAchievements/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievementLocalizations]", + value: parameters.fields[.gameCenterAchievementLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievementVersions]", + value: parameters.fields[.gameCenterAchievementVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAchievements]", + value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterAchievementVersions as `GameCenterAchievementVersionsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementVersionsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterAchievements.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievementLocalizations + public static var gameCenterAchievementLocalizations: Relation<[GameCenterAchievementLocalizations]?> { + .init(key: "fields[gameCenterAchievementLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterAchievementVersions + public static var gameCenterAchievementVersions: Relation<[GameCenterAchievementVersions]?> { + .init(key: "fields[gameCenterAchievementVersions]") + } + + /// the fields to include for returned resources of type gameCenterAchievements + public static var gameCenterAchievements: Relation<[GameCenterAchievements]?> { + .init(key: "fields[gameCenterAchievements]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievement: Self { + .init(rawValue: "achievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/GameCenterAchievements.POST.c51fbb6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/GameCenterAchievements.POST.c51fbb6.generated.swift new file mode 100644 index 00000000..1126a1ec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterAchievements/GameCenterAchievements.POST.c51fbb6.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterAchievements { + public struct POST: Endpoint { + public typealias Parameters = GameCenterAchievementV2CreateRequest + public typealias Response = GameCenterAchievementV2Response + + public var path: String { + "/v2/gameCenterAchievements" + } + + /// GameCenterAchievement representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterAchievement as `GameCenterAchievementV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterAchievementV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.d5db53d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.d5db53d.generated.swift new file mode 100644 index 00000000..b670acdc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.d5db53d.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.d5db53d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.d5db53d.generated.swift new file mode 100644 index 00000000..a6b96504 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.d5db53d.generated.swift @@ -0,0 +1,166 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardImages.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardImages]", + value: parameters.fields[.gameCenterLeaderboardImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardImages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardImages + public static var gameCenterLeaderboardImages: Relation<[GameCenterLeaderboardImages]?> { + .init(key: "fields[gameCenterLeaderboardImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localization: Self { + .init(rawValue: "localization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.d5db53d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.d5db53d.generated.swift new file mode 100644 index 00000000..c4ae4eab --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.d5db53d.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardImageV2UpdateRequest + public typealias Response = GameCenterLeaderboardImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterLeaderboardImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.3b0b23f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.3b0b23f.generated.swift new file mode 100644 index 00000000..a60e3e87 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.3b0b23f.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardImages { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardImageV2CreateRequest + public typealias Response = GameCenterLeaderboardImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardImages" + } + + /// GameCenterLeaderboardImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.e18436e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.e18436e.generated.swift new file mode 100644 index 00000000..106edbe2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.e18436e.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardLocalizations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.e18436e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.e18436e.generated.swift new file mode 100644 index 00000000..357bcdcf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.e18436e.generated.swift @@ -0,0 +1,221 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardLocalizations.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardLocalizationV2Response + + public var path: String { + "/v2/gameCenterLeaderboardLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardImages]", + value: parameters.fields[.gameCenterLeaderboardImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardLocalizations]", + value: parameters.fields[.gameCenterLeaderboardLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardLocalization as `GameCenterLeaderboardLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardLocalizations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardImages + public static var gameCenterLeaderboardImages: Relation<[GameCenterLeaderboardImages]?> { + .init(key: "fields[gameCenterLeaderboardImages]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardLocalizations + public static var gameCenterLeaderboardLocalizations: Relation<[GameCenterLeaderboardLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.e18436e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.e18436e.generated.swift new file mode 100644 index 00000000..47dbb54c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.e18436e.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardLocalizations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardLocalizationV2UpdateRequest + public typealias Response = GameCenterLeaderboardLocalizationV2Response + + public var path: String { + "/v2/gameCenterLeaderboardLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterLeaderboardLocalization representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardLocalization as `GameCenterLeaderboardLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/Image/GameCenterLeaderboardLocalizationsByIdImage.GET.aba0c36.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/Image/GameCenterLeaderboardLocalizationsByIdImage.GET.aba0c36.generated.swift new file mode 100644 index 00000000..17523b32 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/Image/GameCenterLeaderboardLocalizationsByIdImage.GET.aba0c36.generated.swift @@ -0,0 +1,217 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardLocalizations.ById.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardLocalizations/\(id)/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardImages]", + value: parameters.fields[.gameCenterLeaderboardImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardLocalizations]", + value: parameters.fields[.gameCenterLeaderboardLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardLocalizations.ById.Image.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardImages + public static var gameCenterLeaderboardImages: Relation<[GameCenterLeaderboardImages]?> { + .init(key: "fields[gameCenterLeaderboardImages]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardLocalizations + public static var gameCenterLeaderboardLocalizations: Relation<[GameCenterLeaderboardLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localization: Self { + .init(rawValue: "localization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/Relationships/Image/GameCenterLeaderboardLocalizationsByIdRelationshipsImage.GET.cd3e133.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/Relationships/Image/GameCenterLeaderboardLocalizationsByIdRelationshipsImage.GET.cd3e133.generated.swift new file mode 100644 index 00000000..e0575fd8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/ById/Relationships/Image/GameCenterLeaderboardLocalizationsByIdRelationshipsImage.GET.cd3e133.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardLocalizations.ById.Relationships.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardLocalizationV2ImageLinkageResponse + + public var path: String { + "/v2/gameCenterLeaderboardLocalizations/\(id)/relationships/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterLeaderboardLocalizationV2ImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationV2ImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardLocalizations.ById.Relationships.Image.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.74c8ce7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.74c8ce7.generated.swift new file mode 100644 index 00000000..02665028 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.74c8ce7.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardLocalizations { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardLocalizationV2CreateRequest + public typealias Response = GameCenterLeaderboardLocalizationV2Response + + public var path: String { + "/v2/gameCenterLeaderboardLocalizations" + } + + /// GameCenterLeaderboardLocalization representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardLocalization as `GameCenterLeaderboardLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.d928b8a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.d928b8a.generated.swift new file mode 100644 index 00000000..846c3cba --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.d928b8a.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardSetImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.d928b8a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.d928b8a.generated.swift new file mode 100644 index 00000000..362d7533 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.d928b8a.generated.swift @@ -0,0 +1,166 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetImages.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetImages]", + value: parameters.fields[.gameCenterLeaderboardSetImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetImages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetImages + public static var gameCenterLeaderboardSetImages: Relation<[GameCenterLeaderboardSetImages]?> { + .init(key: "fields[gameCenterLeaderboardSetImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localization: Self { + .init(rawValue: "localization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.d928b8a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.d928b8a.generated.swift new file mode 100644 index 00000000..6d12985e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.d928b8a.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetImageV2UpdateRequest + public typealias Response = GameCenterLeaderboardSetImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterLeaderboardSetImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.a4ba612.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.a4ba612.generated.swift new file mode 100644 index 00000000..b8df9f4a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.a4ba612.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetImages { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetImageV2CreateRequest + public typealias Response = GameCenterLeaderboardSetImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetImages" + } + + /// GameCenterLeaderboardSetImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardSetImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.76ea3c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.76ea3c1.generated.swift new file mode 100644 index 00000000..422f6cc5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.76ea3c1.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetLocalizations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardSetLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.76ea3c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.76ea3c1.generated.swift new file mode 100644 index 00000000..2775d934 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.76ea3c1.generated.swift @@ -0,0 +1,205 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetLocalizations.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetLocalizationV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetImages]", + value: parameters.fields[.gameCenterLeaderboardSetImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetLocalizations]", + value: parameters.fields[.gameCenterLeaderboardSetLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSetLocalization as `GameCenterLeaderboardSetLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetLocalizations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetImages + public static var gameCenterLeaderboardSetImages: Relation<[GameCenterLeaderboardSetImages]?> { + .init(key: "fields[gameCenterLeaderboardSetImages]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetLocalizations + public static var gameCenterLeaderboardSetLocalizations: Relation<[GameCenterLeaderboardSetLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardSetLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.76ea3c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.76ea3c1.generated.swift new file mode 100644 index 00000000..aa31fa1e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.76ea3c1.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetLocalizations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetLocalizationV2UpdateRequest + public typealias Response = GameCenterLeaderboardSetLocalizationV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterLeaderboardSetLocalization representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSetLocalization as `GameCenterLeaderboardSetLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/Image/GameCenterLeaderboardSetLocalizationsByIdImage.GET.646a5d6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/Image/GameCenterLeaderboardSetLocalizationsByIdImage.GET.646a5d6.generated.swift new file mode 100644 index 00000000..281cec10 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/Image/GameCenterLeaderboardSetLocalizationsByIdImage.GET.646a5d6.generated.swift @@ -0,0 +1,201 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetLocalizations.ById.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetImageV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetLocalizations/\(id)/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetImages]", + value: parameters.fields[.gameCenterLeaderboardSetImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetLocalizations]", + value: parameters.fields[.gameCenterLeaderboardSetLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetImageV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetLocalizations.ById.Image.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetImages + public static var gameCenterLeaderboardSetImages: Relation<[GameCenterLeaderboardSetImages]?> { + .init(key: "fields[gameCenterLeaderboardSetImages]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetLocalizations + public static var gameCenterLeaderboardSetLocalizations: Relation<[GameCenterLeaderboardSetLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardSetLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localization: Self { + .init(rawValue: "localization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/Relationships/Image/GameCenterLeaderboardSetLocalizationsByIdRelationshipsImage.GET.4736507.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/Relationships/Image/GameCenterLeaderboardSetLocalizationsByIdRelationshipsImage.GET.4736507.generated.swift new file mode 100644 index 00000000..fb0742a3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/ById/Relationships/Image/GameCenterLeaderboardSetLocalizationsByIdRelationshipsImage.GET.4736507.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetLocalizations.ById.Relationships.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse + + public var path: String { + "/v2/gameCenterLeaderboardSetLocalizations/\(id)/relationships/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetLocalizations.ById.Relationships.Image.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.aea32b9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.aea32b9.generated.swift new file mode 100644 index 00000000..a9f1eacb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.aea32b9.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetLocalizations { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetLocalizationV2CreateRequest + public typealias Response = GameCenterLeaderboardSetLocalizationV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetLocalizations" + } + + /// GameCenterLeaderboardSetLocalization representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardSetLocalization as `GameCenterLeaderboardSetLocalizationV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/GameCenterLeaderboardSetVersionsById.GET.ee47006.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/GameCenterLeaderboardSetVersionsById.GET.ee47006.generated.swift new file mode 100644 index 00000000..b0d0c403 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/GameCenterLeaderboardSetVersionsById.GET.ee47006.generated.swift @@ -0,0 +1,223 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetVersions.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetVersionV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetLocalizations]", + value: parameters.fields[.gameCenterLeaderboardSetLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSetVersion as `GameCenterLeaderboardSetVersionV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetVersionV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetVersions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetLocalizations + public static var gameCenterLeaderboardSetLocalizations: Relation<[GameCenterLeaderboardSetLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardSetLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/Localizations/GameCenterLeaderboardSetVersionsByIdLocalizations.GET.20f676b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/Localizations/GameCenterLeaderboardSetVersionsByIdLocalizations.GET.20f676b.generated.swift new file mode 100644 index 00000000..7bd12010 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/Localizations/GameCenterLeaderboardSetVersionsByIdLocalizations.GET.20f676b.generated.swift @@ -0,0 +1,245 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetVersions.ById.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetLocalizationsV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetVersions/\(id)/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetImages]", + value: parameters.fields[.gameCenterLeaderboardSetImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetLocalizations]", + value: parameters.fields[.gameCenterLeaderboardSetLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboardSetLocalizations as `GameCenterLeaderboardSetLocalizationsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetVersions.ById.Localizations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetImages + public static var gameCenterLeaderboardSetImages: Relation<[GameCenterLeaderboardSetImages]?> { + .init(key: "fields[gameCenterLeaderboardSetImages]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetLocalizations + public static var gameCenterLeaderboardSetLocalizations: Relation<[GameCenterLeaderboardSetLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardSetLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/Relationships/Localizations/GameCenterLeaderboardSetVersionsByIdRelationshipsLocalizations.GET.bd8d3d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/Relationships/Localizations/GameCenterLeaderboardSetVersionsByIdRelationshipsLocalizations.GET.bd8d3d7.generated.swift new file mode 100644 index 00000000..a916b585 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/ById/Relationships/Localizations/GameCenterLeaderboardSetVersionsByIdRelationshipsLocalizations.GET.bd8d3d7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetVersions.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse + + public var path: String { + "/v2/gameCenterLeaderboardSetVersions/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSetVersions.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/GameCenterLeaderboardSetVersions.POST.1eedabb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/GameCenterLeaderboardSetVersions.POST.1eedabb.generated.swift new file mode 100644 index 00000000..2c2a595e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSetVersions/GameCenterLeaderboardSetVersions.POST.1eedabb.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSetVersions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetVersionV2CreateRequest + public typealias Response = GameCenterLeaderboardSetVersionV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSetVersions" + } + + /// GameCenterLeaderboardSetVersion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardSetVersion as `GameCenterLeaderboardSetVersionV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardSetVersionV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.d2546a9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.d2546a9.generated.swift new file mode 100644 index 00000000..fae53185 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.d2546a9.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.d2546a9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.d2546a9.generated.swift new file mode 100644 index 00000000..7a2b618f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.d2546a9.generated.swift @@ -0,0 +1,341 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboards]", + value: parameters.limit[.gameCenterLeaderboards].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSets.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboards returned (when they are included) + public static var gameCenterLeaderboards: Relation { + .init(key: "limit[gameCenterLeaderboards]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.d2546a9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.d2546a9.generated.swift new file mode 100644 index 00000000..1b0b6be0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.d2546a9.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetV2UpdateRequest + public typealias Response = GameCenterLeaderboardSetV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterLeaderboardSet representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.5f31840.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.5f31840.generated.swift new file mode 100644 index 00000000..2db5c1f1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.5f31840.generated.swift @@ -0,0 +1,705 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.GameCenterLeaderboards { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardsV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/gameCenterLeaderboards" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboardSets]", + value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboards as `GameCenterLeaderboardsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var achievementsV2: Self { + .init(rawValue: "achievementsV2") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var leaderboardsV2: Self { + .init(rawValue: "leaderboardsV2") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var leaderboardV2: Self { + .init(rawValue: "leaderboardV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultGroupLeaderboardV2: Self { + .init(rawValue: "defaultGroupLeaderboardV2") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var defaultLeaderboardV2: Self { + .init(rawValue: "defaultLeaderboardV2") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterAchievementsV2: Self { + .init(rawValue: "gameCenterAchievementsV2") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboardSetsV2: Self { + .init(rawValue: "gameCenterLeaderboardSetsV2") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var gameCenterLeaderboardsV2: Self { + .init(rawValue: "gameCenterLeaderboardsV2") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) + public static var gameCenterLeaderboardSets: Relation { + .init(key: "limit[gameCenterLeaderboardSets]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.95bf64e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.95bf64e.generated.swift new file mode 100644 index 00000000..91b18bff --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.95bf64e.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/relationships/gameCenterLeaderboards" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.95bf64e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.95bf64e.generated.swift new file mode 100644 index 00000000..541cdde2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.95bf64e.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/relationships/gameCenterLeaderboards" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.95bf64e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.95bf64e.generated.swift new file mode 100644 index 00000000..f6ce7c33 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.95bf64e.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesRequest + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/relationships/gameCenterLeaderboards" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.95bf64e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.95bf64e.generated.swift new file mode 100644 index 00000000..c4c54a88 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.95bf64e.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesRequest + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/relationships/gameCenterLeaderboards" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/Versions/GameCenterLeaderboardSetsByIdRelationshipsVersions.GET.00f511a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/Versions/GameCenterLeaderboardSetsByIdRelationshipsVersions.GET.00f511a.generated.swift new file mode 100644 index 00000000..08519d00 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Relationships/Versions/GameCenterLeaderboardSetsByIdRelationshipsVersions.GET.00f511a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetV2VersionsLinkagesResponse + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardSetV2VersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetV2VersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSets.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Versions/GameCenterLeaderboardSetsByIdVersions.GET.41673e2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Versions/GameCenterLeaderboardSetsByIdVersions.GET.41673e2.generated.swift new file mode 100644 index 00000000..ce551e6a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/ById/Versions/GameCenterLeaderboardSetsByIdVersions.GET.41673e2.generated.swift @@ -0,0 +1,274 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets.ById.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetVersionsV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSets/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardSetLocalizations]", + value: parameters.fields[.gameCenterLeaderboardSetLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSetVersions]", + value: parameters.fields[.gameCenterLeaderboardSetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardSets]", + value: parameters.fields[.gameCenterLeaderboardSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboardSetVersions as `GameCenterLeaderboardSetVersionsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetVersionsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardSets.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardSetLocalizations + public static var gameCenterLeaderboardSetLocalizations: Relation<[GameCenterLeaderboardSetLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardSetLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSetVersions + public static var gameCenterLeaderboardSetVersions: Relation<[GameCenterLeaderboardSetVersions]?> { + .init(key: "fields[gameCenterLeaderboardSetVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardSets + public static var gameCenterLeaderboardSets: Relation<[GameCenterLeaderboardSets]?> { + .init(key: "fields[gameCenterLeaderboardSets]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboardSet: Self { + .init(rawValue: "leaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.67c18e1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.67c18e1.generated.swift new file mode 100644 index 00000000..d53da160 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.67c18e1.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardSets { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardSetV2CreateRequest + public typealias Response = GameCenterLeaderboardSetV2Response + + public var path: String { + "/v2/gameCenterLeaderboardSets" + } + + /// GameCenterLeaderboardSet representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardSetV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/GameCenterLeaderboardVersionsById.GET.6b36f33.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/GameCenterLeaderboardVersionsById.GET.6b36f33.generated.swift new file mode 100644 index 00000000..ce8a1304 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/GameCenterLeaderboardVersionsById.GET.6b36f33.generated.swift @@ -0,0 +1,239 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardVersions.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardVersionV2Response + + public var path: String { + "/v2/gameCenterLeaderboardVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardLocalizations]", + value: parameters.fields[.gameCenterLeaderboardLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboardVersion as `GameCenterLeaderboardVersionV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardVersionV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardVersions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardLocalizations + public static var gameCenterLeaderboardLocalizations: Relation<[GameCenterLeaderboardLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/Localizations/GameCenterLeaderboardVersionsByIdLocalizations.GET.ef5cd35.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/Localizations/GameCenterLeaderboardVersionsByIdLocalizations.GET.ef5cd35.generated.swift new file mode 100644 index 00000000..ac5c48df --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/Localizations/GameCenterLeaderboardVersionsByIdLocalizations.GET.ef5cd35.generated.swift @@ -0,0 +1,261 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardVersions.ById.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardLocalizationsV2Response + + public var path: String { + "/v2/gameCenterLeaderboardVersions/\(id)/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardImages]", + value: parameters.fields[.gameCenterLeaderboardImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardLocalizations]", + value: parameters.fields[.gameCenterLeaderboardLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboardLocalizations as `GameCenterLeaderboardLocalizationsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardVersions.ById.Localizations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var localization: Self { + .init(rawValue: "localization") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardImages + public static var gameCenterLeaderboardImages: Relation<[GameCenterLeaderboardImages]?> { + .init(key: "fields[gameCenterLeaderboardImages]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardLocalizations + public static var gameCenterLeaderboardLocalizations: Relation<[GameCenterLeaderboardLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/Relationships/Localizations/GameCenterLeaderboardVersionsByIdRelationshipsLocalizations.GET.5dff804.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/Relationships/Localizations/GameCenterLeaderboardVersionsByIdRelationshipsLocalizations.GET.5dff804.generated.swift new file mode 100644 index 00000000..6cc64200 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/ById/Relationships/Localizations/GameCenterLeaderboardVersionsByIdRelationshipsLocalizations.GET.5dff804.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardVersions.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse + + public var path: String { + "/v2/gameCenterLeaderboardVersions/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboardVersions.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/GameCenterLeaderboardVersions.POST.bd4238d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/GameCenterLeaderboardVersions.POST.bd4238d.generated.swift new file mode 100644 index 00000000..5c03f42a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboardVersions/GameCenterLeaderboardVersions.POST.bd4238d.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboardVersions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardVersionV2CreateRequest + public typealias Response = GameCenterLeaderboardVersionV2Response + + public var path: String { + "/v2/gameCenterLeaderboardVersions" + } + + /// GameCenterLeaderboardVersion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardVersion as `GameCenterLeaderboardVersionV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardVersionV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.b852ef7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.b852ef7.generated.swift new file mode 100644 index 00000000..34697348 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.b852ef7.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.b852ef7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.b852ef7.generated.swift new file mode 100644 index 00000000..2e5f3c26 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.b852ef7.generated.swift @@ -0,0 +1,306 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardV2Response + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[gameCenterLeaderboardSets]", + value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboard as `GameCenterLeaderboardV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboards.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) + public static var gameCenterLeaderboardSets: Relation { + .init(key: "limit[gameCenterLeaderboardSets]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.b852ef7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.b852ef7.generated.swift new file mode 100644 index 00000000..af77e9d1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.b852ef7.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardV2UpdateRequest + public typealias Response = GameCenterLeaderboardV2Response + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterLeaderboard representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterLeaderboard as `GameCenterLeaderboardV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.b2836fd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.b2836fd.generated.swift new file mode 100644 index 00000000..7fc74fa2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.b2836fd.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById.Relationships.Activity { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardV2ActivityLinkageRequest + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)/relationships/activity" + } + + /// the id of the requested resource + public var id: String + + /// Related linkage + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.f1523bb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.f1523bb.generated.swift new file mode 100644 index 00000000..65d94e2a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.f1523bb.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById.Relationships.Challenge { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardV2ChallengeLinkageRequest + public typealias Response = Void + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)/relationships/challenge" + } + + /// the id of the requested resource + public var id: String + + /// Related linkage + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Versions/GameCenterLeaderboardsByIdRelationshipsVersions.GET.b54346b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Versions/GameCenterLeaderboardsByIdRelationshipsVersions.GET.b54346b.generated.swift new file mode 100644 index 00000000..68d795c3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Relationships/Versions/GameCenterLeaderboardsByIdRelationshipsVersions.GET.b54346b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardV2VersionsLinkagesResponse + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardV2VersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardV2VersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboards.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Versions/GameCenterLeaderboardsByIdVersions.GET.65e1eac.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Versions/GameCenterLeaderboardsByIdVersions.GET.65e1eac.generated.swift new file mode 100644 index 00000000..ba84a97f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/ById/Versions/GameCenterLeaderboardsByIdVersions.GET.65e1eac.generated.swift @@ -0,0 +1,342 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards.ById.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardVersionsV2Response + + public var path: String { + "/v2/gameCenterLeaderboards/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterLeaderboardLocalizations]", + value: parameters.fields[.gameCenterLeaderboardLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboardVersions]", + value: parameters.fields[.gameCenterLeaderboardVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterLeaderboardVersions as `GameCenterLeaderboardVersionsV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardVersionsV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.GameCenterLeaderboards.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterLeaderboardLocalizations + public static var gameCenterLeaderboardLocalizations: Relation<[GameCenterLeaderboardLocalizations]?> { + .init(key: "fields[gameCenterLeaderboardLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboardVersions + public static var gameCenterLeaderboardVersions: Relation<[GameCenterLeaderboardVersions]?> { + .init(key: "fields[gameCenterLeaderboardVersions]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/GameCenterLeaderboards.POST.87c1bb6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/GameCenterLeaderboards.POST.87c1bb6.generated.swift new file mode 100644 index 00000000..0914c8fd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/GameCenterLeaderboards/GameCenterLeaderboards.POST.87c1bb6.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.GameCenterLeaderboards { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardV2CreateRequest + public typealias Response = GameCenterLeaderboardV2Response + + public var path: String { + "/v2/gameCenterLeaderboards" + } + + /// GameCenterLeaderboard representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboard as `GameCenterLeaderboardV2Response` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardV2Response.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift index 78e560e0..e3339c78 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift @@ -186,6 +186,10 @@ extension V2.InAppPurchases.ById.AppStoreReviewScreenshot.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift index d1c8e700..ff84651e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift @@ -170,6 +170,10 @@ extension V2.InAppPurchases.ById.Content.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift index d0344c76..5bd04242 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift @@ -187,6 +187,10 @@ extension V2.InAppPurchases.ById.Images.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift index bed10ce0..835c6015 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift @@ -175,6 +175,10 @@ extension V2.InAppPurchases.ById.InAppPurchaseLocalizations.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift index eddfee7c..18507a2a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift @@ -38,6 +38,8 @@ extension V2.InAppPurchases.ById { value: parameters.fields[.inAppPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchaseLocalizations]", value: parameters.fields[.inAppPurchaseLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodes]", + value: parameters.fields[.inAppPurchaseOfferCodes]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchasePricePoints]", value: parameters.fields[.inAppPurchasePricePoints]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchasePriceSchedules]", @@ -52,6 +54,8 @@ extension V2.InAppPurchases.ById { value: parameters.limit[.images].map { "\($0)" }), URLQueryItem(name: "limit[inAppPurchaseLocalizations]", value: parameters.limit[.inAppPurchaseLocalizations].map { "\($0)" }), + URLQueryItem(name: "limit[offerCodes]", + value: parameters.limit[.offerCodes].map { "\($0)" }), URLQueryItem(name: "limit[pricePoints]", value: parameters.limit[.pricePoints].map { "\($0)" }) ].filter { $0.value != nil } @@ -295,6 +299,50 @@ extension V2.InAppPurchases.ById.GET { } } + public struct InAppPurchaseOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { public static var customerPrice: Self { .init(rawValue: "customerPrice") @@ -388,6 +436,10 @@ extension V2.InAppPurchases.ById.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } @@ -477,6 +529,11 @@ extension V2.InAppPurchases.ById.GET { .init(key: "fields[inAppPurchaseLocalizations]") } + /// the fields to include for returned resources of type inAppPurchaseOfferCodes + public static var inAppPurchaseOfferCodes: Relation<[InAppPurchaseOfferCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodes]") + } + /// the fields to include for returned resources of type inAppPurchasePricePoints public static var inAppPurchasePricePoints: Relation<[InAppPurchasePricePoints]?> { .init(key: "fields[inAppPurchasePricePoints]") @@ -530,6 +587,10 @@ extension V2.InAppPurchases.ById.GET { .init(rawValue: "inAppPurchaseLocalizations") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } @@ -568,6 +629,11 @@ extension V2.InAppPurchases.ById.GET { .init(key: "limit[inAppPurchaseLocalizations]") } + /// maximum number of related offerCodes returned (when they are included) + public static var offerCodes: Relation { + .init(key: "limit[offerCodes]") + } + /// maximum number of related pricePoints returned (when they are included) public static var pricePoints: Relation { .init(key: "limit[pricePoints]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/OfferCodes/InAppPurchasesByIdOfferCodes.GET.b7d2242.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/OfferCodes/InAppPurchasesByIdOfferCodes.GET.b7d2242.generated.swift new file mode 100644 index 00000000..1e04eb3b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/OfferCodes/InAppPurchasesByIdOfferCodes.GET.b7d2242.generated.swift @@ -0,0 +1,381 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.OfferCodes { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseOfferCodesResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/offerCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[inAppPurchaseOfferCodeCustomCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeCustomCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]", + value: parameters.fields[.inAppPurchaseOfferCodeOneTimeUseCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferCodes]", + value: parameters.fields[.inAppPurchaseOfferCodes]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseOfferPrices]", + value: parameters.fields[.inAppPurchaseOfferPrices]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[territory]", + value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[customCodes]", + value: parameters.limit[.customCodes].map { "\($0)" }), + URLQueryItem(name: "limit[oneTimeUseCodes]", + value: parameters.limit[.oneTimeUseCodes].map { "\($0)" }), + URLQueryItem(name: "limit[prices]", + value: parameters.limit[.prices].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of InAppPurchaseOfferCodes as `InAppPurchaseOfferCodesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseOfferCodesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.OfferCodes.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InAppPurchaseOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deactivatedByActor: Self { + .init(rawValue: "deactivatedByActor") + } + + public static var environment: Self { + .init(rawValue: "environment") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var values: Self { + .init(rawValue: "values") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productionCodeCount: Self { + .init(rawValue: "productionCodeCount") + } + + public static var sandboxCodeCount: Self { + .init(rawValue: "sandboxCodeCount") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var pricePoint: Self { + .init(rawValue: "pricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type inAppPurchaseOfferCodeCustomCodes + public static var inAppPurchaseOfferCodeCustomCodes: Relation<[InAppPurchaseOfferCodeCustomCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeCustomCodes]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferCodeOneTimeUseCodes + public static var inAppPurchaseOfferCodeOneTimeUseCodes: Relation<[InAppPurchaseOfferCodeOneTimeUseCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodeOneTimeUseCodes]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferCodes + public static var inAppPurchaseOfferCodes: Relation<[InAppPurchaseOfferCodes]?> { + .init(key: "fields[inAppPurchaseOfferCodes]") + } + + /// the fields to include for returned resources of type inAppPurchaseOfferPrices + public static var inAppPurchaseOfferPrices: Relation<[InAppPurchaseOfferPrices]?> { + .init(key: "fields[inAppPurchaseOfferPrices]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by territory + public static var territory: Relation<[String]?> { + .init(key: "filter[territory]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related customCodes returned (when they are included) + public static var customCodes: Relation { + .init(key: "limit[customCodes]") + } + + /// maximum number of related oneTimeUseCodes returned (when they are included) + public static var oneTimeUseCodes: Relation { + .init(key: "limit[oneTimeUseCodes]") + } + + /// maximum number of related prices returned (when they are included) + public static var prices: Relation { + .init(key: "limit[prices]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift index 3bdbeda8..439baada 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift @@ -140,6 +140,10 @@ extension V2.InAppPurchases.ById.PromotedPurchase.GET { .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + public static var pricePoints: Self { .init(rawValue: "pricePoints") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/OfferCodes/InAppPurchasesByIdRelationshipsOfferCodes.GET.89db1f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/OfferCodes/InAppPurchasesByIdRelationshipsOfferCodes.GET.89db1f3.generated.swift new file mode 100644 index 00000000..6f2f02e8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/OfferCodes/InAppPurchasesByIdRelationshipsOfferCodes.GET.89db1f3.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.OfferCodes { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2OfferCodesLinkagesResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/offerCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseV2OfferCodesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2OfferCodesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.OfferCodes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift index 6ab007d6..3021f310 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift @@ -157,6 +157,10 @@ extension V3.AppPricePoints.ById.Equalizations.GET { .init(rawValue: "analyticsReportRequests") } + public static var androidToIosAppMappingDetails: Self { + .init(rawValue: "androidToIosAppMappingDetails") + } + public static var appAvailabilityV2: Self { .init(rawValue: "appAvailabilityV2") } @@ -189,6 +193,10 @@ extension V3.AppPricePoints.ById.Equalizations.GET { .init(rawValue: "appPriceSchedule") } + public static var appStoreIcon: Self { + .init(rawValue: "appStoreIcon") + } + public static var appStoreVersionExperimentsV2: Self { .init(rawValue: "appStoreVersionExperimentsV2") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift index 659be663..5fcfcd4d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift @@ -8,6 +8,8 @@ public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { public var type: `Type` + public var attributes: Attributes? + public var relationships: Relationships? public var links: ResourceLinks? @@ -15,11 +17,13 @@ public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { public init( id: String, type: `Type`, + attributes: Attributes? = nil, relationships: Relationships? = nil, links: ResourceLinks? = nil ) { self.id = id self.type = type + self.attributes = attributes self.relationships = relationships self.links = links } @@ -27,6 +31,7 @@ public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { private enum CodingKeys: String, CodingKey { case id case type + case attributes case relationships case links } @@ -35,6 +40,18 @@ public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { case alternativeDistributionPackages } + public struct Attributes: Hashable, Codable, Sendable { + public var sourceFileChecksum: Checksums? + + public init(sourceFileChecksum: Checksums? = nil) { + self.sourceFileChecksum = sourceFileChecksum + } + + private enum CodingKeys: String, CodingKey { + case sourceFileChecksum + } + } + public struct Relationships: Hashable, Codable, Sendable { public var versions: Versions? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AndroidToIosAppMappingDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AndroidToIosAppMappingDetail.generated.swift new file mode 100644 index 00000000..7122d6fd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AndroidToIosAppMappingDetail.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AndroidToIosAppMappingDetail: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case androidToIosAppMappingDetails + } + + public struct Attributes: Hashable, Codable, Sendable { + public var appSigningKeyPublicCertificateSha256Fingerprints: [String]? + + public var packageName: String? + + public init( + appSigningKeyPublicCertificateSha256Fingerprints: [String]? = nil, + packageName: String? = nil + ) { + self.appSigningKeyPublicCertificateSha256Fingerprints = appSigningKeyPublicCertificateSha256Fingerprints + self.packageName = packageName + } + + private enum CodingKeys: String, CodingKey { + case appSigningKeyPublicCertificateSha256Fingerprints + case packageName + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift index 034e6c9f..72b2755a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift @@ -136,6 +136,8 @@ public struct App: Hashable, Codable, Sendable { public var analyticsReportRequests: AnalyticsReportRequests? + public var androidToIosAppMappingDetails: AndroidToIosAppMappingDetails? + public var appAvailabilityV2: AppAvailabilityV2? public var appClips: AppClips? @@ -152,6 +154,8 @@ public struct App: Hashable, Codable, Sendable { public var appPriceSchedule: AppPriceSchedule? + public var appStoreIcon: AppStoreIcon? + public var appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? public var appStoreVersions: AppStoreVersions? @@ -217,6 +221,7 @@ public struct App: Hashable, Codable, Sendable { accessibilityDeclarations: AccessibilityDeclarations? = nil, alternativeDistributionKey: AlternativeDistributionKey? = nil, analyticsReportRequests: AnalyticsReportRequests? = nil, + androidToIosAppMappingDetails: AndroidToIosAppMappingDetails? = nil, appAvailabilityV2: AppAvailabilityV2? = nil, appClips: AppClips? = nil, appCustomProductPages: AppCustomProductPages? = nil, @@ -225,6 +230,7 @@ public struct App: Hashable, Codable, Sendable { appInfos: AppInfos? = nil, appPricePoints: AppPricePoints? = nil, appPriceSchedule: AppPriceSchedule? = nil, + appStoreIcon: AppStoreIcon? = nil, appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? = nil, appStoreVersions: AppStoreVersions? = nil, appTags: AppTags? = nil, @@ -259,6 +265,7 @@ public struct App: Hashable, Codable, Sendable { self.accessibilityDeclarations = accessibilityDeclarations self.alternativeDistributionKey = alternativeDistributionKey self.analyticsReportRequests = analyticsReportRequests + self.androidToIosAppMappingDetails = androidToIosAppMappingDetails self.appAvailabilityV2 = appAvailabilityV2 self.appClips = appClips self.appCustomProductPages = appCustomProductPages @@ -267,6 +274,7 @@ public struct App: Hashable, Codable, Sendable { self.appInfos = appInfos self.appPricePoints = appPricePoints self.appPriceSchedule = appPriceSchedule + self.appStoreIcon = appStoreIcon self.appStoreVersionExperimentsV2 = appStoreVersionExperimentsV2 self.appStoreVersions = appStoreVersions self.appTags = appTags @@ -303,6 +311,7 @@ public struct App: Hashable, Codable, Sendable { case accessibilityDeclarations case alternativeDistributionKey case analyticsReportRequests + case androidToIosAppMappingDetails case appAvailabilityV2 case appClips case appCustomProductPages @@ -311,6 +320,7 @@ public struct App: Hashable, Codable, Sendable { case appInfos case appPricePoints case appPriceSchedule + case appStoreIcon case appStoreVersionExperimentsV2 case appStoreVersions case appTags @@ -379,6 +389,53 @@ public struct App: Hashable, Codable, Sendable { } } + public struct AndroidToIosAppMappingDetails: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case androidToIosAppMappingDetails + } + } + } + public struct AppAvailabilityV2: Hashable, Codable, Sendable { public var links: RelationshipLinks? @@ -650,6 +707,41 @@ public struct App: Hashable, Codable, Sendable { } } + public struct AppStoreIcon: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case buildIcons + } + } + } + public struct AppStoreVersionExperimentsV2: Hashable, Codable, Sendable { public var data: [Data]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift index 7e7ee5d7..8ce3dc75 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift @@ -480,6 +480,10 @@ public struct AppClipAdvancedExperience: Hashable, Codable, Sendable { .init(rawValue: "PARKING_RESERVE_PARKING") } + public static var payToPark: Self { + .init(rawValue: "PAY_TO_PARK") + } + public static var restaurantJoinWaitlist: Self { .init(rawValue: "RESTAURANT_JOIN_WAITLIST") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift index 84ec524b..8f9f79cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift @@ -41,19 +41,24 @@ public struct BackgroundAsset: Hashable, Codable, Sendable { } public struct Attributes: Hashable, Codable, Sendable { + public var archived: Bool? + public var assetPackIdentifier: String? public var createdDate: String? public init( + archived: Bool? = nil, assetPackIdentifier: String? = nil, createdDate: String? = nil ) { + self.archived = archived self.assetPackIdentifier = assetPackIdentifier self.createdDate = createdDate } private enum CodingKeys: String, CodingKey { + case archived case assetPackIdentifier case createdDate } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift index 797e0370..a683104b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift @@ -47,17 +47,21 @@ public struct BackgroundAssetVersion: Hashable, Codable, Sendable { public var state: BackgroundAssetVersionState? + public var stateDetails: StateDetails? + public var version: String? public init( createdDate: String? = nil, platforms: [Platform]? = nil, state: BackgroundAssetVersionState? = nil, + stateDetails: StateDetails? = nil, version: String? = nil ) { self.createdDate = createdDate self.platforms = platforms self.state = state + self.stateDetails = stateDetails self.version = version } @@ -65,8 +69,33 @@ public struct BackgroundAssetVersion: Hashable, Codable, Sendable { case createdDate case platforms case state + case stateDetails case version } + + public struct StateDetails: Hashable, Codable, Sendable { + public var errors: [StateDetail]? + + public var infos: [StateDetail]? + + public var warnings: [StateDetail]? + + public init( + errors: [StateDetail]? = nil, + infos: [StateDetail]? = nil, + warnings: [StateDetail]? = nil + ) { + self.errors = errors + self.infos = infos + self.warnings = warnings + } + + private enum CodingKeys: String, CodingKey { + case errors + case infos + case warnings + } + } } public struct Relationships: Hashable, Codable, Sendable { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift index 38c7f9cf..600dc5a8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift @@ -41,6 +41,8 @@ public struct BetaTester: Hashable, Codable, Sendable { } public struct Attributes: Hashable, Codable, Sendable { + public var appDevices: [AppDevices]? + public var email: String? public var firstName: String? @@ -52,12 +54,14 @@ public struct BetaTester: Hashable, Codable, Sendable { public var state: BetaTesterState? public init( + appDevices: [AppDevices]? = nil, email: String? = nil, firstName: String? = nil, inviteType: BetaInviteType? = nil, lastName: String? = nil, state: BetaTesterState? = nil ) { + self.appDevices = appDevices self.email = email self.firstName = firstName self.inviteType = inviteType @@ -66,12 +70,74 @@ public struct BetaTester: Hashable, Codable, Sendable { } private enum CodingKeys: String, CodingKey { + case appDevices case email case firstName case inviteType case lastName case state } + + public struct AppDevices: Hashable, Codable, Sendable { + public var appBuildVersion: String? + + public var model: String? + + public var osVersion: String? + + public var platform: Platform? + + public init( + appBuildVersion: String? = nil, + model: String? = nil, + osVersion: String? = nil, + platform: Platform? = nil + ) { + self.appBuildVersion = appBuildVersion + self.model = model + self.osVersion = osVersion + self.platform = platform + } + + private enum CodingKeys: String, CodingKey { + case appBuildVersion + case model + case osVersion + case platform + } + + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public static var watchOS: Self { + .init(rawValue: "WATCH_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } } public struct Relationships: Hashable, Codable, Sendable { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImageV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImageV2.generated.swift new file mode 100644 index 00000000..7f8324de --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImageV2.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementImageV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var uploadOperations: [UploadOperation]? + + public init( + assetDeliveryState: AppMediaAssetState? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetDeliveryState + case fileName + case fileSize + case imageAsset + case uploadOperations + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization? + + public init(localization: Localization? = nil) { + self.localization = localization + } + + private enum CodingKeys: String, CodingKey { + case localization + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalizationV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalizationV2.generated.swift new file mode 100644 index 00000000..41e66866 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalizationV2.generated.swift @@ -0,0 +1,169 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var afterEarnedDescription: String? + + public var beforeEarnedDescription: String? + + public var locale: String? + + public var name: String? + + public init( + afterEarnedDescription: String? = nil, + beforeEarnedDescription: String? = nil, + locale: String? = nil, + name: String? = nil + ) { + self.afterEarnedDescription = afterEarnedDescription + self.beforeEarnedDescription = beforeEarnedDescription + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case afterEarnedDescription + case beforeEarnedDescription + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var image: Image? + + public var version: Version? + + public init( + image: Image? = nil, + version: Version? = nil + ) { + self.image = image + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case image + case version + } + + public struct Image: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementImages + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementV2.generated.swift new file mode 100644 index 00000000..e0ce57bc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementV2.generated.swift @@ -0,0 +1,276 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + + public var archived: Bool? + + public var points: Int? + + public var referenceName: String? + + public var repeatable: Bool? + + public var showBeforeEarned: Bool? + + public var vendorIdentifier: String? + + public init( + activityProperties: [String: String]? = nil, + archived: Bool? = nil, + points: Int? = nil, + referenceName: String? = nil, + repeatable: Bool? = nil, + showBeforeEarned: Bool? = nil, + vendorIdentifier: String? = nil + ) { + self.activityProperties = activityProperties + self.archived = archived + self.points = points + self.referenceName = referenceName + self.repeatable = repeatable + self.showBeforeEarned = showBeforeEarned + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case activityProperties + case archived + case points + case referenceName + case repeatable + case showBeforeEarned + case vendorIdentifier + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var activity: Activity? + + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var versions: Versions? + + public init( + activity: Activity? = nil, + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + versions: Versions? = nil + ) { + self.activity = activity + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case activity + case gameCenterDetail + case gameCenterGroup + case versions + } + + public struct Activity: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementVersionV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementVersionV2.generated.swift new file mode 100644 index 00000000..e5d1a385 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementVersionV2.generated.swift @@ -0,0 +1,164 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementVersionV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var state: GameCenterVersionState? + + public var version: Int? + + public init( + state: GameCenterVersionState? = nil, + version: Int? = nil + ) { + self.state = state + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case state + case version + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var achievement: Achievement? + + public var localizations: Localizations? + + public init( + achievement: Achievement? = nil, + localizations: Localizations? = nil + ) { + self.achievement = achievement + self.localizations = localizations + } + + private enum CodingKeys: String, CodingKey { + case achievement + case localizations + } + + public struct Achievement: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + + public struct Localizations: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementVersionV2InlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementVersionV2InlineCreate.generated.swift new file mode 100644 index 00000000..735044ea --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementVersionV2InlineCreate.generated.swift @@ -0,0 +1,81 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementVersionV2InlineCreate: Hashable, Codable, Sendable { + public var id: String? + + public var type: `Type` + + public var relationships: Relationships? + + public init( + id: String? = nil, + type: `Type`, + relationships: Relationships? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var achievement: Achievement? + + public init(achievement: Achievement? = nil) { + self.achievement = achievement + } + + private enum CodingKeys: String, CodingKey { + case achievement + } + + public struct Achievement: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift index 88bed684..e7a30ec2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift @@ -112,33 +112,43 @@ public struct GameCenterActivity: Hashable, Codable, Sendable { public struct Relationships: Hashable, Codable, Sendable { public var achievements: Achievements? + public var achievementsV2: AchievementsV2? + public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? public var leaderboards: Leaderboards? + public var leaderboardsV2: LeaderboardsV2? + public var versions: Versions? public init( achievements: Achievements? = nil, + achievementsV2: AchievementsV2? = nil, gameCenterDetail: GameCenterDetail? = nil, gameCenterGroup: GameCenterGroup? = nil, leaderboards: Leaderboards? = nil, + leaderboardsV2: LeaderboardsV2? = nil, versions: Versions? = nil ) { self.achievements = achievements + self.achievementsV2 = achievementsV2 self.gameCenterDetail = gameCenterDetail self.gameCenterGroup = gameCenterGroup self.leaderboards = leaderboards + self.leaderboardsV2 = leaderboardsV2 self.versions = versions } private enum CodingKeys: String, CodingKey { case achievements + case achievementsV2 case gameCenterDetail case gameCenterGroup case leaderboards + case leaderboardsV2 case versions } @@ -189,6 +199,53 @@ public struct GameCenterActivity: Hashable, Codable, Sendable { } } + public struct AchievementsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? @@ -306,6 +363,53 @@ public struct GameCenterActivity: Hashable, Codable, Sendable { } } + public struct LeaderboardsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct Versions: Hashable, Codable, Sendable { public var data: [Data]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift index 9adff34a..7969cbbb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift @@ -97,17 +97,21 @@ public struct GameCenterChallenge: Hashable, Codable, Sendable { public var leaderboard: Leaderboard? + public var leaderboardV2: LeaderboardV2? + public var versions: Versions? public init( gameCenterDetail: GameCenterDetail? = nil, gameCenterGroup: GameCenterGroup? = nil, leaderboard: Leaderboard? = nil, + leaderboardV2: LeaderboardV2? = nil, versions: Versions? = nil ) { self.gameCenterDetail = gameCenterDetail self.gameCenterGroup = gameCenterGroup self.leaderboard = leaderboard + self.leaderboardV2 = leaderboardV2 self.versions = versions } @@ -115,6 +119,7 @@ public struct GameCenterChallenge: Hashable, Codable, Sendable { case gameCenterDetail case gameCenterGroup case leaderboard + case leaderboardV2 case versions } @@ -230,6 +235,48 @@ public struct GameCenterChallenge: Hashable, Codable, Sendable { } } + public struct LeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct Versions: Hashable, Codable, Sendable { public var data: [Data]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift index 2f6538af..23918579 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift @@ -73,10 +73,16 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { public var defaultGroupLeaderboard: DefaultGroupLeaderboard? + public var defaultGroupLeaderboardV2: DefaultGroupLeaderboardV2? + public var defaultLeaderboard: DefaultLeaderboard? + public var defaultLeaderboardV2: DefaultLeaderboardV2? + public var gameCenterAchievements: GameCenterAchievements? + public var gameCenterAchievementsV2: GameCenterAchievementsV2? + public var gameCenterActivities: GameCenterActivities? public var gameCenterAppVersions: GameCenterAppVersions? @@ -87,8 +93,12 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? + public var gameCenterLeaderboardSetsV2: GameCenterLeaderboardSetsV2? + public var gameCenterLeaderboards: GameCenterLeaderboards? + public var gameCenterLeaderboardsV2: GameCenterLeaderboardsV2? + public var leaderboardReleases: LeaderboardReleases? public var leaderboardSetReleases: LeaderboardSetReleases? @@ -100,14 +110,19 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { challengeReleases: ChallengeReleases? = nil, challengesMinimumPlatformVersions: ChallengesMinimumPlatformVersions? = nil, defaultGroupLeaderboard: DefaultGroupLeaderboard? = nil, + defaultGroupLeaderboardV2: DefaultGroupLeaderboardV2? = nil, defaultLeaderboard: DefaultLeaderboard? = nil, + defaultLeaderboardV2: DefaultLeaderboardV2? = nil, gameCenterAchievements: GameCenterAchievements? = nil, + gameCenterAchievementsV2: GameCenterAchievementsV2? = nil, gameCenterActivities: GameCenterActivities? = nil, gameCenterAppVersions: GameCenterAppVersions? = nil, gameCenterChallenges: GameCenterChallenges? = nil, gameCenterGroup: GameCenterGroup? = nil, gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, + gameCenterLeaderboardSetsV2: GameCenterLeaderboardSetsV2? = nil, gameCenterLeaderboards: GameCenterLeaderboards? = nil, + gameCenterLeaderboardsV2: GameCenterLeaderboardsV2? = nil, leaderboardReleases: LeaderboardReleases? = nil, leaderboardSetReleases: LeaderboardSetReleases? = nil ) { @@ -117,14 +132,19 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { self.challengeReleases = challengeReleases self.challengesMinimumPlatformVersions = challengesMinimumPlatformVersions self.defaultGroupLeaderboard = defaultGroupLeaderboard + self.defaultGroupLeaderboardV2 = defaultGroupLeaderboardV2 self.defaultLeaderboard = defaultLeaderboard + self.defaultLeaderboardV2 = defaultLeaderboardV2 self.gameCenterAchievements = gameCenterAchievements + self.gameCenterAchievementsV2 = gameCenterAchievementsV2 self.gameCenterActivities = gameCenterActivities self.gameCenterAppVersions = gameCenterAppVersions self.gameCenterChallenges = gameCenterChallenges self.gameCenterGroup = gameCenterGroup self.gameCenterLeaderboardSets = gameCenterLeaderboardSets + self.gameCenterLeaderboardSetsV2 = gameCenterLeaderboardSetsV2 self.gameCenterLeaderboards = gameCenterLeaderboards + self.gameCenterLeaderboardsV2 = gameCenterLeaderboardsV2 self.leaderboardReleases = leaderboardReleases self.leaderboardSetReleases = leaderboardSetReleases } @@ -136,14 +156,19 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { case challengeReleases case challengesMinimumPlatformVersions case defaultGroupLeaderboard + case defaultGroupLeaderboardV2 case defaultLeaderboard + case defaultLeaderboardV2 case gameCenterAchievements + case gameCenterAchievementsV2 case gameCenterActivities case gameCenterAppVersions case gameCenterChallenges case gameCenterGroup case gameCenterLeaderboardSets + case gameCenterLeaderboardSetsV2 case gameCenterLeaderboards + case gameCenterLeaderboardsV2 case leaderboardReleases case leaderboardSetReleases } @@ -406,6 +431,41 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { } } + public struct DefaultGroupLeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct DefaultLeaderboard: Hashable, Codable, Sendable { public var data: Data? @@ -441,6 +501,41 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { } } + public struct DefaultLeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct GameCenterAchievements: Hashable, Codable, Sendable { public var data: [Data]? @@ -488,6 +583,53 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { } } + public struct GameCenterAchievementsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + public struct GameCenterActivities: Hashable, Codable, Sendable { public var data: [Data]? @@ -718,6 +860,53 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { } } + public struct GameCenterLeaderboardSetsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { public var data: [Data]? @@ -765,6 +954,53 @@ public struct GameCenterDetail: Hashable, Codable, Sendable { } } + public struct GameCenterLeaderboardsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct LeaderboardReleases: Hashable, Codable, Sendable { public var data: [Data]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift index 66be1599..f283c854 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift @@ -55,6 +55,8 @@ public struct GameCenterGroup: Hashable, Codable, Sendable { public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievements: GameCenterAchievements? + public var gameCenterAchievementsV2: GameCenterAchievementsV2? + public var gameCenterActivities: GameCenterActivities? public var gameCenterChallenges: GameCenterChallenges? @@ -63,31 +65,44 @@ public struct GameCenterGroup: Hashable, Codable, Sendable { public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? + public var gameCenterLeaderboardSetsV2: GameCenterLeaderboardSetsV2? + public var gameCenterLeaderboards: GameCenterLeaderboards? + public var gameCenterLeaderboardsV2: GameCenterLeaderboardsV2? + public init( gameCenterAchievements: GameCenterAchievements? = nil, + gameCenterAchievementsV2: GameCenterAchievementsV2? = nil, gameCenterActivities: GameCenterActivities? = nil, gameCenterChallenges: GameCenterChallenges? = nil, gameCenterDetails: GameCenterDetails? = nil, gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, - gameCenterLeaderboards: GameCenterLeaderboards? = nil + gameCenterLeaderboardSetsV2: GameCenterLeaderboardSetsV2? = nil, + gameCenterLeaderboards: GameCenterLeaderboards? = nil, + gameCenterLeaderboardsV2: GameCenterLeaderboardsV2? = nil ) { self.gameCenterAchievements = gameCenterAchievements + self.gameCenterAchievementsV2 = gameCenterAchievementsV2 self.gameCenterActivities = gameCenterActivities self.gameCenterChallenges = gameCenterChallenges self.gameCenterDetails = gameCenterDetails self.gameCenterLeaderboardSets = gameCenterLeaderboardSets + self.gameCenterLeaderboardSetsV2 = gameCenterLeaderboardSetsV2 self.gameCenterLeaderboards = gameCenterLeaderboards + self.gameCenterLeaderboardsV2 = gameCenterLeaderboardsV2 } private enum CodingKeys: String, CodingKey { case gameCenterAchievements + case gameCenterAchievementsV2 case gameCenterActivities case gameCenterChallenges case gameCenterDetails case gameCenterLeaderboardSets + case gameCenterLeaderboardSetsV2 case gameCenterLeaderboards + case gameCenterLeaderboardsV2 } public struct GameCenterAchievements: Hashable, Codable, Sendable { @@ -137,6 +152,53 @@ public struct GameCenterGroup: Hashable, Codable, Sendable { } } + public struct GameCenterAchievementsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + public struct GameCenterActivities: Hashable, Codable, Sendable { public var data: [Data]? @@ -325,6 +387,53 @@ public struct GameCenterGroup: Hashable, Codable, Sendable { } } + public struct GameCenterLeaderboardSetsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { public var data: [Data]? @@ -371,6 +480,53 @@ public struct GameCenterGroup: Hashable, Codable, Sendable { } } } + + public struct GameCenterLeaderboardsV2: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImageV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImageV2.generated.swift new file mode 100644 index 00000000..b7a1e166 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImageV2.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardImageV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var uploadOperations: [UploadOperation]? + + public init( + assetDeliveryState: AppMediaAssetState? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetDeliveryState + case fileName + case fileSize + case imageAsset + case uploadOperations + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization? + + public init(localization: Localization? = nil) { + self.localization = localization + } + + private enum CodingKeys: String, CodingKey { + case localization + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalizationV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalizationV2.generated.swift new file mode 100644 index 00000000..8e207d1f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalizationV2.generated.swift @@ -0,0 +1,179 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var formatterOverride: GameCenterLeaderboardFormatter? + + public var formatterSuffix: String? + + public var formatterSuffixSingular: String? + + public var locale: String? + + public var name: String? + + public init( + description: String? = nil, + formatterOverride: GameCenterLeaderboardFormatter? = nil, + formatterSuffix: String? = nil, + formatterSuffixSingular: String? = nil, + locale: String? = nil, + name: String? = nil + ) { + self.description = description + self.formatterOverride = formatterOverride + self.formatterSuffix = formatterSuffix + self.formatterSuffixSingular = formatterSuffixSingular + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case formatterOverride + case formatterSuffix + case formatterSuffixSingular + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var image: Image? + + public var version: Version? + + public init( + image: Image? = nil, + version: Version? = nil + ) { + self.image = image + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case image + case version + } + + public struct Image: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardImages + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImageV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImageV2.generated.swift new file mode 100644 index 00000000..ca7a4385 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImageV2.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetImageV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var uploadOperations: [UploadOperation]? + + public init( + assetDeliveryState: AppMediaAssetState? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetDeliveryState + case fileName + case fileSize + case imageAsset + case uploadOperations + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization? + + public init(localization: Localization? = nil) { + self.localization = localization + } + + private enum CodingKeys: String, CodingKey { + case localization + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalizationV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalizationV2.generated.swift new file mode 100644 index 00000000..9721a8f7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalizationV2.generated.swift @@ -0,0 +1,159 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var locale: String? + + public var name: String? + + public init( + locale: String? = nil, + name: String? = nil + ) { + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var image: Image? + + public var version: Version? + + public init( + image: Image? = nil, + version: Version? = nil + ) { + self.image = image + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case image + case version + } + + public struct Image: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImages + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetV2.generated.swift new file mode 100644 index 00000000..31d660bf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetV2.generated.swift @@ -0,0 +1,256 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + + public struct Attributes: Hashable, Codable, Sendable { + public var referenceName: String? + + public var vendorIdentifier: String? + + public init( + referenceName: String? = nil, + vendorIdentifier: String? = nil + ) { + self.referenceName = referenceName + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case referenceName + case vendorIdentifier + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var gameCenterLeaderboards: GameCenterLeaderboards? + + public var versions: Versions? + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + gameCenterLeaderboards: GameCenterLeaderboards? = nil, + versions: Versions? = nil + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.gameCenterLeaderboards = gameCenterLeaderboards + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + case gameCenterLeaderboards + case versions + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetVersionV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetVersionV2.generated.swift new file mode 100644 index 00000000..2f311b30 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetVersionV2.generated.swift @@ -0,0 +1,164 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetVersionV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var state: GameCenterVersionState? + + public var version: Int? + + public init( + state: GameCenterVersionState? = nil, + version: Int? = nil + ) { + self.state = state + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case state + case version + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboardSet: LeaderboardSet? + + public var localizations: Localizations? + + public init( + leaderboardSet: LeaderboardSet? = nil, + localizations: Localizations? = nil + ) { + self.leaderboardSet = leaderboardSet + self.localizations = localizations + } + + private enum CodingKeys: String, CodingKey { + case leaderboardSet + case localizations + } + + public struct LeaderboardSet: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + + public struct Localizations: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetVersionV2InlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetVersionV2InlineCreate.generated.swift new file mode 100644 index 00000000..6bfa52b0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetVersionV2InlineCreate.generated.swift @@ -0,0 +1,81 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetVersionV2InlineCreate: Hashable, Codable, Sendable { + public var id: String? + + public var type: `Type` + + public var relationships: Relationships? + + public init( + id: String? = nil, + type: `Type`, + relationships: Relationships? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboardSet: LeaderboardSet? + + public init(leaderboardSet: LeaderboardSet? = nil) { + self.leaderboardSet = leaderboardSet + } + + private enum CodingKeys: String, CodingKey { + case leaderboardSet + } + + public struct LeaderboardSet: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardV2.generated.swift new file mode 100644 index 00000000..5df0be70 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardV2.generated.swift @@ -0,0 +1,460 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + + public var archived: Bool? + + public var defaultFormatter: GameCenterLeaderboardFormatter? + + public var recurrenceDuration: String? + + public var recurrenceRule: String? + + public var recurrenceStartDate: String? + + public var referenceName: String? + + public var scoreRangeEnd: String? + + public var scoreRangeStart: String? + + public var scoreSortType: ScoreSortType? + + public var submissionType: SubmissionType? + + public var vendorIdentifier: String? + + public var visibility: Visibility? + + public init( + activityProperties: [String: String]? = nil, + archived: Bool? = nil, + defaultFormatter: GameCenterLeaderboardFormatter? = nil, + recurrenceDuration: String? = nil, + recurrenceRule: String? = nil, + recurrenceStartDate: String? = nil, + referenceName: String? = nil, + scoreRangeEnd: String? = nil, + scoreRangeStart: String? = nil, + scoreSortType: ScoreSortType? = nil, + submissionType: SubmissionType? = nil, + vendorIdentifier: String? = nil, + visibility: Visibility? = nil + ) { + self.activityProperties = activityProperties + self.archived = archived + self.defaultFormatter = defaultFormatter + self.recurrenceDuration = recurrenceDuration + self.recurrenceRule = recurrenceRule + self.recurrenceStartDate = recurrenceStartDate + self.referenceName = referenceName + self.scoreRangeEnd = scoreRangeEnd + self.scoreRangeStart = scoreRangeStart + self.scoreSortType = scoreSortType + self.submissionType = submissionType + self.vendorIdentifier = vendorIdentifier + self.visibility = visibility + } + + private enum CodingKeys: String, CodingKey { + case activityProperties + case archived + case defaultFormatter + case recurrenceDuration + case recurrenceRule + case recurrenceStartDate + case referenceName + case scoreRangeEnd + case scoreRangeStart + case scoreSortType + case submissionType + case vendorIdentifier + case visibility + } + + public struct ScoreSortType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asc: Self { + .init(rawValue: "ASC") + } + + public static var desc: Self { + .init(rawValue: "DESC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct SubmissionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bestScore: Self { + .init(rawValue: "BEST_SCORE") + } + + public static var mostRecentScore: Self { + .init(rawValue: "MOST_RECENT_SCORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Visibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hideForAll: Self { + .init(rawValue: "HIDE_FOR_ALL") + } + + public static var showForAll: Self { + .init(rawValue: "SHOW_FOR_ALL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var activity: Activity? + + public var challenge: Challenge? + + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? + + public var versions: Versions? + + public init( + activity: Activity? = nil, + challenge: Challenge? = nil, + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, + versions: Versions? = nil + ) { + self.activity = activity + self.challenge = challenge + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.gameCenterLeaderboardSets = gameCenterLeaderboardSets + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case activity + case challenge + case gameCenterDetail + case gameCenterGroup + case gameCenterLeaderboardSets + case versions + } + + public struct Activity: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } + } + + public struct Challenge: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + } + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, Sendable { + public var data: [Data]? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardVersionV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardVersionV2.generated.swift new file mode 100644 index 00000000..ecbe6b59 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardVersionV2.generated.swift @@ -0,0 +1,164 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardVersionV2: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var state: GameCenterVersionState? + + public var version: Int? + + public init( + state: GameCenterVersionState? = nil, + version: Int? = nil + ) { + self.state = state + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case state + case version + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboard: Leaderboard? + + public var localizations: Localizations? + + public init( + leaderboard: Leaderboard? = nil, + localizations: Localizations? = nil + ) { + self.leaderboard = leaderboard + self.localizations = localizations + } + + private enum CodingKeys: String, CodingKey { + case leaderboard + case localizations + } + + public struct Leaderboard: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + + public struct Localizations: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardVersionV2InlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardVersionV2InlineCreate.generated.swift new file mode 100644 index 00000000..ec9aa9c9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardVersionV2InlineCreate.generated.swift @@ -0,0 +1,81 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardVersionV2InlineCreate: Hashable, Codable, Sendable { + public var id: String? + + public var type: `Type` + + public var relationships: Relationships? + + public init( + id: String? = nil, + type: `Type`, + relationships: Relationships? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboard: Leaderboard? + + public init(leaderboard: Leaderboard? = nil) { + self.leaderboard = leaderboard + } + + private enum CodingKeys: String, CodingKey { + case leaderboard + } + + public struct Leaderboard: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCode.generated.swift new file mode 100644 index 00000000..38325bb5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCode.generated.swift @@ -0,0 +1,267 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCode: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var active: Bool? + + public var customerEligibilities: [CustomerEligibilities]? + + public var name: String? + + public var productionCodeCount: Int? + + public var sandboxCodeCount: Int? + + public init( + active: Bool? = nil, + customerEligibilities: [CustomerEligibilities]? = nil, + name: String? = nil, + productionCodeCount: Int? = nil, + sandboxCodeCount: Int? = nil + ) { + self.active = active + self.customerEligibilities = customerEligibilities + self.name = name + self.productionCodeCount = productionCodeCount + self.sandboxCodeCount = sandboxCodeCount + } + + private enum CodingKeys: String, CodingKey { + case active + case customerEligibilities + case name + case productionCodeCount + case sandboxCodeCount + } + + public struct CustomerEligibilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activeSpender: Self { + .init(rawValue: "ACTIVE_SPENDER") + } + + public static var churnedSpender: Self { + .init(rawValue: "CHURNED_SPENDER") + } + + public static var nonSpender: Self { + .init(rawValue: "NON_SPENDER") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var customCodes: CustomCodes? + + public var oneTimeUseCodes: OneTimeUseCodes? + + public var prices: Prices? + + public init( + customCodes: CustomCodes? = nil, + oneTimeUseCodes: OneTimeUseCodes? = nil, + prices: Prices? = nil + ) { + self.customCodes = customCodes + self.oneTimeUseCodes = oneTimeUseCodes + self.prices = prices + } + + private enum CodingKeys: String, CodingKey { + case customCodes + case oneTimeUseCodes + case prices + } + + public struct CustomCodes: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCodes + } + } + } + + public struct OneTimeUseCodes: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodes + } + } + } + + public struct Prices: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferPrices + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeCustomCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeCustomCode.generated.swift new file mode 100644 index 00000000..f1f7d11a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeCustomCode.generated.swift @@ -0,0 +1,167 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCustomCode: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var active: Bool? + + public var createdDate: String? + + public var customCode: String? + + public var expirationDate: String? + + public var numberOfCodes: Int? + + public init( + active: Bool? = nil, + createdDate: String? = nil, + customCode: String? = nil, + expirationDate: String? = nil, + numberOfCodes: Int? = nil + ) { + self.active = active + self.createdDate = createdDate + self.customCode = customCode + self.expirationDate = expirationDate + self.numberOfCodes = numberOfCodes + } + + private enum CodingKeys: String, CodingKey { + case active + case createdDate + case customCode + case expirationDate + case numberOfCodes + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var createdByActor: CreatedByActor? + + public var deactivatedByActor: DeactivatedByActor? + + public init( + createdByActor: CreatedByActor? = nil, + deactivatedByActor: DeactivatedByActor? = nil + ) { + self.createdByActor = createdByActor + self.deactivatedByActor = deactivatedByActor + } + + private enum CodingKeys: String, CodingKey { + case createdByActor + case deactivatedByActor + } + + public struct CreatedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + + public struct DeactivatedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeOneTimeUseCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeOneTimeUseCode.generated.swift new file mode 100644 index 00000000..f9544946 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeOneTimeUseCode.generated.swift @@ -0,0 +1,184 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCode: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var active: Bool? + + public var createdDate: String? + + public var environment: OfferCodeEnvironment? + + public var expirationDate: String? + + public var numberOfCodes: Int? + + public init( + active: Bool? = nil, + createdDate: String? = nil, + environment: OfferCodeEnvironment? = nil, + expirationDate: String? = nil, + numberOfCodes: Int? = nil + ) { + self.active = active + self.createdDate = createdDate + self.environment = environment + self.expirationDate = expirationDate + self.numberOfCodes = numberOfCodes + } + + private enum CodingKeys: String, CodingKey { + case active + case createdDate + case environment + case expirationDate + case numberOfCodes + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var createdByActor: CreatedByActor? + + public var deactivatedByActor: DeactivatedByActor? + + public var values: Values? + + public init( + createdByActor: CreatedByActor? = nil, + deactivatedByActor: DeactivatedByActor? = nil, + values: Values? = nil + ) { + self.createdByActor = createdByActor + self.deactivatedByActor = deactivatedByActor + self.values = values + } + + private enum CodingKeys: String, CodingKey { + case createdByActor + case deactivatedByActor + case values + } + + public struct CreatedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + + public struct DeactivatedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + + public struct Values: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeOneTimeUseCodeValue.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeOneTimeUseCodeValue.generated.swift new file mode 100644 index 00000000..ac37bc16 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferCodeOneTimeUseCodeValue.generated.swift @@ -0,0 +1,34 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodeValue: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodeValues + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferPrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferPrice.generated.swift new file mode 100644 index 00000000..5891c5f6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferPrice.generated.swift @@ -0,0 +1,128 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferPrice: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferPrices + } + + public struct Relationships: Hashable, Codable, Sendable { + public var pricePoint: PricePoint? + + public var territory: Territory? + + public init( + pricePoint: PricePoint? = nil, + territory: Territory? = nil + ) { + self.pricePoint = pricePoint + self.territory = territory + } + + private enum CodingKeys: String, CodingKey { + case pricePoint + case territory + } + + public struct PricePoint: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePricePoints + } + } + } + + public struct Territory: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferPriceInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferPriceInlineCreate.generated.swift new file mode 100644 index 00000000..9d1e6b43 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseOfferPriceInlineCreate.generated.swift @@ -0,0 +1,123 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferPriceInlineCreate: Hashable, Codable, Sendable { + public var id: String? + + public var type: `Type` + + public var relationships: Relationships? + + public init( + id: String? = nil, + type: `Type`, + relationships: Relationships? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferPrices + } + + public struct Relationships: Hashable, Codable, Sendable { + public var pricePoint: PricePoint? + + public var territory: Territory? + + public init( + pricePoint: PricePoint? = nil, + territory: Territory? = nil + ) { + self.pricePoint = pricePoint + self.territory = territory + } + + private enum CodingKeys: String, CodingKey { + case pricePoint + case territory + } + + public struct PricePoint: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePricePoints + } + } + } + + public struct Territory: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift index eaf45182..55f51a13 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift @@ -97,6 +97,8 @@ public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var inAppPurchaseLocalizations: InAppPurchaseLocalizations? + public var offerCodes: OfferCodes? + public var pricePoints: PricePoints? public var promotedPurchase: PromotedPurchase? @@ -108,6 +110,7 @@ public struct InAppPurchaseV2: Hashable, Codable, Sendable { images: Images? = nil, inAppPurchaseAvailability: InAppPurchaseAvailability? = nil, inAppPurchaseLocalizations: InAppPurchaseLocalizations? = nil, + offerCodes: OfferCodes? = nil, pricePoints: PricePoints? = nil, promotedPurchase: PromotedPurchase? = nil ) { @@ -117,6 +120,7 @@ public struct InAppPurchaseV2: Hashable, Codable, Sendable { self.images = images self.inAppPurchaseAvailability = inAppPurchaseAvailability self.inAppPurchaseLocalizations = inAppPurchaseLocalizations + self.offerCodes = offerCodes self.pricePoints = pricePoints self.promotedPurchase = promotedPurchase } @@ -128,6 +132,7 @@ public struct InAppPurchaseV2: Hashable, Codable, Sendable { case images case inAppPurchaseAvailability case inAppPurchaseLocalizations + case offerCodes case pricePoints case promotedPurchase } @@ -394,6 +399,53 @@ public struct InAppPurchaseV2: Hashable, Codable, Sendable { } } + public struct OfferCodes: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + } + } + public struct PricePoints: Hashable, Codable, Sendable { public var data: [Data]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/OfferCodeEnvironment.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/OfferCodeEnvironment.generated.swift new file mode 100644 index 00000000..f2466fdc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/OfferCodeEnvironment.generated.swift @@ -0,0 +1,26 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct OfferCodeEnvironment: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var production: Self { + .init(rawValue: "PRODUCTION") + } + + public static var sandbox: Self { + .init(rawValue: "SANDBOX") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AndroidToIosAppMappingDetailCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AndroidToIosAppMappingDetailCreateRequest.generated.swift new file mode 100644 index 00000000..fc512f16 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AndroidToIosAppMappingDetailCreateRequest.generated.swift @@ -0,0 +1,112 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AndroidToIosAppMappingDetailCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case androidToIosAppMappingDetails + } + + public struct Attributes: Hashable, Codable, Sendable { + public var appSigningKeyPublicCertificateSha256Fingerprints: [String] + + public var packageName: String + + public init( + appSigningKeyPublicCertificateSha256Fingerprints: [String], + packageName: String + ) { + self.appSigningKeyPublicCertificateSha256Fingerprints = appSigningKeyPublicCertificateSha256Fingerprints + self.packageName = packageName + } + + private enum CodingKeys: String, CodingKey { + case appSigningKeyPublicCertificateSha256Fingerprints + case packageName + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var app: App + + public init(app: App) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AndroidToIosAppMappingDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AndroidToIosAppMappingDetailUpdateRequest.generated.swift new file mode 100644 index 00000000..ad2398c9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AndroidToIosAppMappingDetailUpdateRequest.generated.swift @@ -0,0 +1,65 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AndroidToIosAppMappingDetailUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case androidToIosAppMappingDetails + } + + public struct Attributes: Hashable, Codable, Sendable { + public var appSigningKeyPublicCertificateSha256Fingerprints: [String]? + + public var packageName: String? + + public init( + appSigningKeyPublicCertificateSha256Fingerprints: [String]? = nil, + packageName: String? = nil + ) { + self.appSigningKeyPublicCertificateSha256Fingerprints = appSigningKeyPublicCertificateSha256Fingerprints + self.packageName = packageName + } + + private enum CodingKeys: String, CodingKey { + case appSigningKeyPublicCertificateSha256Fingerprints + case packageName + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift index 611fc5a9..af4a7a7f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift @@ -473,6 +473,10 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable, Sendabl .init(rawValue: "PARKING_RESERVE_PARKING") } + public static var payToPark: Self { + .init(rawValue: "PAY_TO_PARK") + } + public static var restaurantJoinWaitlist: Self { .init(rawValue: "RESTAURANT_JOIN_WAITLIST") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift index a8a2c3f8..3c790781 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift @@ -478,6 +478,10 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable, Sendabl .init(rawValue: "PARKING_RESERVE_PARKING") } + public static var payToPark: Self { + .init(rawValue: "PAY_TO_PARK") + } + public static var restaurantJoinWaitlist: Self { .init(rawValue: "RESTAURANT_JOIN_WAITLIST") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUpdateRequest.generated.swift new file mode 100644 index 00000000..a0905b58 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssets + } + + public struct Attributes: Hashable, Codable, Sendable { + public var archived: Bool? + + public init(archived: Bool? = nil) { + self.archived = archived + } + + private enum CodingKeys: String, CodingKey { + case archived + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageV2CreateRequest.generated.swift new file mode 100644 index 00000000..f88daa43 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageV2CreateRequest.generated.swift @@ -0,0 +1,112 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementImageV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileName: String + + public var fileSize: Int + + public init( + fileName: String, + fileSize: Int + ) { + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case fileName + case fileSize + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization + + public init(localization: Localization) { + self.localization = localization + } + + private enum CodingKeys: String, CodingKey { + case localization + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageV2UpdateRequest.generated.swift new file mode 100644 index 00000000..746eee48 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageV2UpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementImageV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var uploaded: Bool? + + public init(uploaded: Bool? = nil) { + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationV2CreateRequest.generated.swift new file mode 100644 index 00000000..d254a923 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationV2CreateRequest.generated.swift @@ -0,0 +1,122 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var afterEarnedDescription: String + + public var beforeEarnedDescription: String + + public var locale: String + + public var name: String + + public init( + afterEarnedDescription: String, + beforeEarnedDescription: String, + locale: String, + name: String + ) { + self.afterEarnedDescription = afterEarnedDescription + self.beforeEarnedDescription = beforeEarnedDescription + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case afterEarnedDescription + case beforeEarnedDescription + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version + + public init(version: Version) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationV2UpdateRequest.generated.swift new file mode 100644 index 00000000..99b01efb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationV2UpdateRequest.generated.swift @@ -0,0 +1,70 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var afterEarnedDescription: String? + + public var beforeEarnedDescription: String? + + public var name: String? + + public init( + afterEarnedDescription: String? = nil, + beforeEarnedDescription: String? = nil, + name: String? = nil + ) { + self.afterEarnedDescription = afterEarnedDescription + self.beforeEarnedDescription = beforeEarnedDescription + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case afterEarnedDescription + case beforeEarnedDescription + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2ActivityLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2ActivityLinkageRequest.generated.swift new file mode 100644 index 00000000..b9232832 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2ActivityLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementV2ActivityLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2CreateRequest.generated.swift new file mode 100644 index 00000000..b8a8c8ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2CreateRequest.generated.swift @@ -0,0 +1,221 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public var included: [GameCenterAchievementVersionV2InlineCreate]? + + public init( + data: Data, + included: [GameCenterAchievementVersionV2InlineCreate]? = nil + ) { + self.data = data + self.included = included + } + + private enum CodingKeys: String, CodingKey { + case data + case included + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + + public var points: Int + + public var referenceName: String + + public var repeatable: Bool + + public var showBeforeEarned: Bool + + public var vendorIdentifier: String + + public init( + activityProperties: [String: String]? = nil, + points: Int, + referenceName: String, + repeatable: Bool, + showBeforeEarned: Bool, + vendorIdentifier: String + ) { + self.activityProperties = activityProperties + self.points = points + self.referenceName = referenceName + self.repeatable = repeatable + self.showBeforeEarned = showBeforeEarned + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case activityProperties + case points + case referenceName + case repeatable + case showBeforeEarned + case vendorIdentifier + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var versions: Versions + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + versions: Versions + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + case versions + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2UpdateRequest.generated.swift new file mode 100644 index 00000000..21eb5465 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementV2UpdateRequest.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + + public var archived: Bool? + + public var points: Int? + + public var referenceName: String? + + public var repeatable: Bool? + + public var showBeforeEarned: Bool? + + public init( + activityProperties: [String: String]? = nil, + archived: Bool? = nil, + points: Int? = nil, + referenceName: String? = nil, + repeatable: Bool? = nil, + showBeforeEarned: Bool? = nil + ) { + self.activityProperties = activityProperties + self.archived = archived + self.points = points + self.referenceName = referenceName + self.repeatable = repeatable + self.showBeforeEarned = showBeforeEarned + } + + private enum CodingKeys: String, CodingKey { + case activityProperties + case archived + case points + case referenceName + case repeatable + case showBeforeEarned + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementVersionV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementVersionV2CreateRequest.generated.swift new file mode 100644 index 00000000..57f88bff --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementVersionV2CreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementVersionV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var achievement: Achievement + + public init(achievement: Achievement) { + self.achievement = achievement + } + + private enum CodingKeys: String, CodingKey { + case achievement + } + + public struct Achievement: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..e2d25834 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityAchievementsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..920ad0ca --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLeaderboardsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift index b2280b7e..444ed2e8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift @@ -93,20 +93,25 @@ public struct GameCenterChallengeCreateRequest: Hashable, Codable, Sendable { public var leaderboard: Leaderboard? + public var leaderboardV2: LeaderboardV2? + public init( gameCenterDetail: GameCenterDetail? = nil, gameCenterGroup: GameCenterGroup? = nil, - leaderboard: Leaderboard? = nil + leaderboard: Leaderboard? = nil, + leaderboardV2: LeaderboardV2? = nil ) { self.gameCenterDetail = gameCenterDetail self.gameCenterGroup = gameCenterGroup self.leaderboard = leaderboard + self.leaderboardV2 = leaderboardV2 } private enum CodingKeys: String, CodingKey { case gameCenterDetail case gameCenterGroup case leaderboard + case leaderboardV2 } public struct GameCenterDetail: Hashable, Codable, Sendable { @@ -213,6 +218,41 @@ public struct GameCenterChallengeCreateRequest: Hashable, Codable, Sendable { } } } + + public struct LeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardV2LinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardV2LinkageRequest.generated.swift new file mode 100644 index 00000000..1d8a5672 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardV2LinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLeaderboardV2LinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift index f92ab8e3..dfda25ae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift @@ -73,12 +73,19 @@ public struct GameCenterChallengeUpdateRequest: Hashable, Codable, Sendable { public struct Relationships: Hashable, Codable, Sendable { public var leaderboard: Leaderboard? - public init(leaderboard: Leaderboard? = nil) { + public var leaderboardV2: LeaderboardV2? + + public init( + leaderboard: Leaderboard? = nil, + leaderboardV2: LeaderboardV2? = nil + ) { self.leaderboard = leaderboard + self.leaderboardV2 = leaderboardV2 } private enum CodingKeys: String, CodingKey { case leaderboard + case leaderboardV2 } public struct Leaderboard: Hashable, Codable, Sendable { @@ -115,6 +122,41 @@ public struct GameCenterChallengeUpdateRequest: Hashable, Codable, Sendable { } } } + + public struct LeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..c4ff96c2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterAchievementsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..bd081bc1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterLeaderboardSetsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..78940904 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterLeaderboardsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift index 54d19f9f..16c98b35 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift @@ -62,23 +62,33 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable, Sendable { public struct Relationships: Hashable, Codable, Sendable { public var defaultGroupLeaderboard: DefaultGroupLeaderboard? + public var defaultGroupLeaderboardV2: DefaultGroupLeaderboardV2? + public var defaultLeaderboard: DefaultLeaderboard? + public var defaultLeaderboardV2: DefaultLeaderboardV2? + public var gameCenterGroup: GameCenterGroup? public init( defaultGroupLeaderboard: DefaultGroupLeaderboard? = nil, + defaultGroupLeaderboardV2: DefaultGroupLeaderboardV2? = nil, defaultLeaderboard: DefaultLeaderboard? = nil, + defaultLeaderboardV2: DefaultLeaderboardV2? = nil, gameCenterGroup: GameCenterGroup? = nil ) { self.defaultGroupLeaderboard = defaultGroupLeaderboard + self.defaultGroupLeaderboardV2 = defaultGroupLeaderboardV2 self.defaultLeaderboard = defaultLeaderboard + self.defaultLeaderboardV2 = defaultLeaderboardV2 self.gameCenterGroup = gameCenterGroup } private enum CodingKeys: String, CodingKey { case defaultGroupLeaderboard + case defaultGroupLeaderboardV2 case defaultLeaderboard + case defaultLeaderboardV2 case gameCenterGroup } @@ -117,6 +127,41 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable, Sendable { } } + public struct DefaultGroupLeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct DefaultLeaderboard: Hashable, Codable, Sendable { public var data: Data? @@ -152,6 +197,41 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable, Sendable { } } + public struct DefaultLeaderboardV2: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..3bbc1534 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterAchievementsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..3ef6fe37 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterLeaderboardSetsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsV2LinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsV2LinkagesRequest.generated.swift new file mode 100644 index 00000000..f6534d86 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsV2LinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterLeaderboardsV2LinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageV2CreateRequest.generated.swift new file mode 100644 index 00000000..f92379eb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageV2CreateRequest.generated.swift @@ -0,0 +1,112 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardImageV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileName: String + + public var fileSize: Int + + public init( + fileName: String, + fileSize: Int + ) { + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case fileName + case fileSize + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization + + public init(localization: Localization) { + self.localization = localization + } + + private enum CodingKeys: String, CodingKey { + case localization + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageV2UpdateRequest.generated.swift new file mode 100644 index 00000000..3334a820 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageV2UpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardImageV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var uploaded: Bool? + + public init(uploaded: Bool? = nil) { + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationV2CreateRequest.generated.swift new file mode 100644 index 00000000..69c37be4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationV2CreateRequest.generated.swift @@ -0,0 +1,132 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var formatterOverride: GameCenterLeaderboardFormatter? + + public var formatterSuffix: String? + + public var formatterSuffixSingular: String? + + public var locale: String + + public var name: String + + public init( + description: String? = nil, + formatterOverride: GameCenterLeaderboardFormatter? = nil, + formatterSuffix: String? = nil, + formatterSuffixSingular: String? = nil, + locale: String, + name: String + ) { + self.description = description + self.formatterOverride = formatterOverride + self.formatterSuffix = formatterSuffix + self.formatterSuffixSingular = formatterSuffixSingular + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case formatterOverride + case formatterSuffix + case formatterSuffixSingular + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version + + public init(version: Version) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationV2UpdateRequest.generated.swift new file mode 100644 index 00000000..214574b9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationV2UpdateRequest.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var formatterOverride: GameCenterLeaderboardFormatter? + + public var formatterSuffix: String? + + public var formatterSuffixSingular: String? + + public var name: String? + + public init( + description: String? = nil, + formatterOverride: GameCenterLeaderboardFormatter? = nil, + formatterSuffix: String? = nil, + formatterSuffixSingular: String? = nil, + name: String? = nil + ) { + self.description = description + self.formatterOverride = formatterOverride + self.formatterSuffix = formatterSuffix + self.formatterSuffixSingular = formatterSuffixSingular + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case formatterOverride + case formatterSuffix + case formatterSuffixSingular + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageV2CreateRequest.generated.swift new file mode 100644 index 00000000..0e877dc9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageV2CreateRequest.generated.swift @@ -0,0 +1,112 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetImageV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileName: String + + public var fileSize: Int + + public init( + fileName: String, + fileSize: Int + ) { + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case fileName + case fileSize + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization + + public init(localization: Localization) { + self.localization = localization + } + + private enum CodingKeys: String, CodingKey { + case localization + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageV2UpdateRequest.generated.swift new file mode 100644 index 00000000..a9a4baab --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageV2UpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetImageV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var uploaded: Bool? + + public init(uploaded: Bool? = nil) { + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationV2CreateRequest.generated.swift new file mode 100644 index 00000000..0d9221d1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationV2CreateRequest.generated.swift @@ -0,0 +1,112 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var locale: String + + public var name: String + + public init( + locale: String, + name: String + ) { + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version + + public init(version: Version) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationV2UpdateRequest.generated.swift new file mode 100644 index 00000000..db12a98f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationV2UpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var name: String? + + public init(name: String? = nil) { + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2CreateRequest.generated.swift new file mode 100644 index 00000000..24b0522b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2CreateRequest.generated.swift @@ -0,0 +1,241 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public var included: [GameCenterLeaderboardSetVersionV2InlineCreate]? + + public init( + data: Data, + included: [GameCenterLeaderboardSetVersionV2InlineCreate]? = nil + ) { + self.data = data + self.included = included + } + + private enum CodingKeys: String, CodingKey { + case data + case included + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + + public struct Attributes: Hashable, Codable, Sendable { + public var referenceName: String + + public var vendorIdentifier: String + + public init( + referenceName: String, + vendorIdentifier: String + ) { + self.referenceName = referenceName + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case referenceName + case vendorIdentifier + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var gameCenterLeaderboards: GameCenterLeaderboards? + + public var versions: Versions + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + gameCenterLeaderboards: GameCenterLeaderboards? = nil, + versions: Versions + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.gameCenterLeaderboards = gameCenterLeaderboards + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + case gameCenterLeaderboards + case versions + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesRequest.generated.swift new file mode 100644 index 00000000..44f39238 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2UpdateRequest.generated.swift new file mode 100644 index 00000000..095906ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetV2UpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + + public struct Attributes: Hashable, Codable, Sendable { + public var referenceName: String? + + public init(referenceName: String? = nil) { + self.referenceName = referenceName + } + + private enum CodingKeys: String, CodingKey { + case referenceName + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetVersionV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetVersionV2CreateRequest.generated.swift new file mode 100644 index 00000000..16a171c8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetVersionV2CreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetVersionV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboardSet: LeaderboardSet + + public init(leaderboardSet: LeaderboardSet) { + self.leaderboardSet = leaderboardSet + } + + private enum CodingKeys: String, CodingKey { + case leaderboardSet + } + + public struct LeaderboardSet: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2ActivityLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2ActivityLinkageRequest.generated.swift new file mode 100644 index 00000000..9cc41002 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2ActivityLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2ActivityLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2ChallengeLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2ChallengeLinkageRequest.generated.swift new file mode 100644 index 00000000..14ba7b74 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2ChallengeLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2ChallengeLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2CreateRequest.generated.swift new file mode 100644 index 00000000..674d2ae8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2CreateRequest.generated.swift @@ -0,0 +1,351 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public var included: [GameCenterLeaderboardVersionV2InlineCreate]? + + public init( + data: Data, + included: [GameCenterLeaderboardVersionV2InlineCreate]? = nil + ) { + self.data = data + self.included = included + } + + private enum CodingKeys: String, CodingKey { + case data + case included + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + + public var defaultFormatter: GameCenterLeaderboardFormatter + + public var recurrenceDuration: String? + + public var recurrenceRule: String? + + public var recurrenceStartDate: String? + + public var referenceName: String + + public var scoreRangeEnd: String? + + public var scoreRangeStart: String? + + public var scoreSortType: ScoreSortType + + public var submissionType: SubmissionType + + public var vendorIdentifier: String + + public var visibility: Visibility? + + public init( + activityProperties: [String: String]? = nil, + defaultFormatter: GameCenterLeaderboardFormatter, + recurrenceDuration: String? = nil, + recurrenceRule: String? = nil, + recurrenceStartDate: String? = nil, + referenceName: String, + scoreRangeEnd: String? = nil, + scoreRangeStart: String? = nil, + scoreSortType: ScoreSortType, + submissionType: SubmissionType, + vendorIdentifier: String, + visibility: Visibility? = nil + ) { + self.activityProperties = activityProperties + self.defaultFormatter = defaultFormatter + self.recurrenceDuration = recurrenceDuration + self.recurrenceRule = recurrenceRule + self.recurrenceStartDate = recurrenceStartDate + self.referenceName = referenceName + self.scoreRangeEnd = scoreRangeEnd + self.scoreRangeStart = scoreRangeStart + self.scoreSortType = scoreSortType + self.submissionType = submissionType + self.vendorIdentifier = vendorIdentifier + self.visibility = visibility + } + + private enum CodingKeys: String, CodingKey { + case activityProperties + case defaultFormatter + case recurrenceDuration + case recurrenceRule + case recurrenceStartDate + case referenceName + case scoreRangeEnd + case scoreRangeStart + case scoreSortType + case submissionType + case vendorIdentifier + case visibility + } + + public struct ScoreSortType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asc: Self { + .init(rawValue: "ASC") + } + + public static var desc: Self { + .init(rawValue: "DESC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct SubmissionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bestScore: Self { + .init(rawValue: "BEST_SCORE") + } + + public static var mostRecentScore: Self { + .init(rawValue: "MOST_RECENT_SCORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Visibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hideForAll: Self { + .init(rawValue: "HIDE_FOR_ALL") + } + + public static var showForAll: Self { + .init(rawValue: "SHOW_FOR_ALL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? + + public var versions: Versions + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, + versions: Versions + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.gameCenterLeaderboardSets = gameCenterLeaderboardSets + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + case gameCenterLeaderboardSets + case versions + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2UpdateRequest.generated.swift new file mode 100644 index 00000000..6870cc25 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardV2UpdateRequest.generated.swift @@ -0,0 +1,175 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2UpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + + public var archived: Bool? + + public var defaultFormatter: GameCenterLeaderboardFormatter? + + public var recurrenceDuration: String? + + public var recurrenceRule: String? + + public var recurrenceStartDate: String? + + public var referenceName: String? + + public var scoreRangeEnd: String? + + public var scoreRangeStart: String? + + public var scoreSortType: ScoreSortType? + + public var submissionType: SubmissionType? + + public var visibility: Visibility? + + public init( + activityProperties: [String: String]? = nil, + archived: Bool? = nil, + defaultFormatter: GameCenterLeaderboardFormatter? = nil, + recurrenceDuration: String? = nil, + recurrenceRule: String? = nil, + recurrenceStartDate: String? = nil, + referenceName: String? = nil, + scoreRangeEnd: String? = nil, + scoreRangeStart: String? = nil, + scoreSortType: ScoreSortType? = nil, + submissionType: SubmissionType? = nil, + visibility: Visibility? = nil + ) { + self.activityProperties = activityProperties + self.archived = archived + self.defaultFormatter = defaultFormatter + self.recurrenceDuration = recurrenceDuration + self.recurrenceRule = recurrenceRule + self.recurrenceStartDate = recurrenceStartDate + self.referenceName = referenceName + self.scoreRangeEnd = scoreRangeEnd + self.scoreRangeStart = scoreRangeStart + self.scoreSortType = scoreSortType + self.submissionType = submissionType + self.visibility = visibility + } + + private enum CodingKeys: String, CodingKey { + case activityProperties + case archived + case defaultFormatter + case recurrenceDuration + case recurrenceRule + case recurrenceStartDate + case referenceName + case scoreRangeEnd + case scoreRangeStart + case scoreSortType + case submissionType + case visibility + } + + public struct ScoreSortType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asc: Self { + .init(rawValue: "ASC") + } + + public static var desc: Self { + .init(rawValue: "DESC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct SubmissionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bestScore: Self { + .init(rawValue: "BEST_SCORE") + } + + public static var mostRecentScore: Self { + .init(rawValue: "MOST_RECENT_SCORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Visibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hideForAll: Self { + .init(rawValue: "HIDE_FOR_ALL") + } + + public static var showForAll: Self { + .init(rawValue: "SHOW_FOR_ALL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardVersionV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardVersionV2CreateRequest.generated.swift new file mode 100644 index 00000000..94af849a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardVersionV2CreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardVersionV2CreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboard: Leaderboard + + public init(leaderboard: Leaderboard) { + self.leaderboard = leaderboard + } + + private enum CodingKeys: String, CodingKey { + case leaderboard + } + + public struct Leaderboard: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCreateRequest.generated.swift new file mode 100644 index 00000000..64cf7364 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCreateRequest.generated.swift @@ -0,0 +1,185 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public var included: [InAppPurchaseOfferPriceInlineCreate]? + + public init( + data: Data, + included: [InAppPurchaseOfferPriceInlineCreate]? = nil + ) { + self.data = data + self.included = included + } + + private enum CodingKeys: String, CodingKey { + case data + case included + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var customerEligibilities: [CustomerEligibilities] + + public var name: String + + public init( + customerEligibilities: [CustomerEligibilities], + name: String + ) { + self.customerEligibilities = customerEligibilities + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case customerEligibilities + case name + } + + public struct CustomerEligibilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activeSpender: Self { + .init(rawValue: "ACTIVE_SPENDER") + } + + public static var churnedSpender: Self { + .init(rawValue: "CHURNED_SPENDER") + } + + public static var nonSpender: Self { + .init(rawValue: "NON_SPENDER") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var inAppPurchase: InAppPurchase + + public var prices: Prices + + public init( + inAppPurchase: InAppPurchase, + prices: Prices + ) { + self.inAppPurchase = inAppPurchase + self.prices = prices + } + + private enum CodingKeys: String, CodingKey { + case inAppPurchase + case prices + } + + public struct InAppPurchase: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchases + } + } + } + + public struct Prices: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferPrices + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCustomCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCustomCodeCreateRequest.generated.swift new file mode 100644 index 00000000..e5595daa --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCustomCodeCreateRequest.generated.swift @@ -0,0 +1,117 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCustomCodeCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var customCode: String + + public var expirationDate: String? + + public var numberOfCodes: Int + + public init( + customCode: String, + expirationDate: String? = nil, + numberOfCodes: Int + ) { + self.customCode = customCode + self.expirationDate = expirationDate + self.numberOfCodes = numberOfCodes + } + + private enum CodingKeys: String, CodingKey { + case customCode + case expirationDate + case numberOfCodes + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var offerCode: OfferCode + + public init(offerCode: OfferCode) { + self.offerCode = offerCode + } + + private enum CodingKeys: String, CodingKey { + case offerCode + } + + public struct OfferCode: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCustomCodeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCustomCodeUpdateRequest.generated.swift new file mode 100644 index 00000000..d563a5f7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeCustomCodeUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCustomCodeUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var active: Bool? + + public init(active: Bool? = nil) { + self.active = active + } + + private enum CodingKeys: String, CodingKey { + case active + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeOneTimeUseCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeOneTimeUseCodeCreateRequest.generated.swift new file mode 100644 index 00000000..7ff89550 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeOneTimeUseCodeCreateRequest.generated.swift @@ -0,0 +1,117 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var environment: OfferCodeEnvironment? + + public var expirationDate: String + + public var numberOfCodes: Int + + public init( + environment: OfferCodeEnvironment? = nil, + expirationDate: String, + numberOfCodes: Int + ) { + self.environment = environment + self.expirationDate = expirationDate + self.numberOfCodes = numberOfCodes + } + + private enum CodingKeys: String, CodingKey { + case environment + case expirationDate + case numberOfCodes + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var offerCode: OfferCode + + public init(offerCode: OfferCode) { + self.offerCode = offerCode + } + + private enum CodingKeys: String, CodingKey { + case offerCode + } + + public struct OfferCode: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeOneTimeUseCodeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeOneTimeUseCodeUpdateRequest.generated.swift new file mode 100644 index 00000000..d0596529 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeOneTimeUseCodeUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodeUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var active: Bool? + + public init(active: Bool? = nil) { + self.active = active + } + + private enum CodingKeys: String, CodingKey { + case active + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeUpdateRequest.generated.swift new file mode 100644 index 00000000..13887081 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseOfferCodeUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + + public struct Attributes: Hashable, Codable, Sendable { + public var active: Bool? + + public init(active: Bool? = nil) { + self.active = active + } + + private enum CodingKeys: String, CodingKey { + case active + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift index 0788ad0f..9d41c72d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift @@ -49,6 +49,16 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable, Sendable { public var backgroundAssetVersion: BackgroundAssetVersion? + public var gameCenterAchievementVersion: GameCenterAchievementVersion? + + public var gameCenterActivityVersion: GameCenterActivityVersion? + + public var gameCenterChallengeVersion: GameCenterChallengeVersion? + + public var gameCenterLeaderboardSetVersion: GameCenterLeaderboardSetVersion? + + public var gameCenterLeaderboardVersion: GameCenterLeaderboardVersion? + public var reviewSubmission: ReviewSubmission public init( @@ -58,6 +68,11 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable, Sendable { appStoreVersionExperiment: AppStoreVersionExperiment? = nil, appStoreVersionExperimentV2: AppStoreVersionExperimentV2? = nil, backgroundAssetVersion: BackgroundAssetVersion? = nil, + gameCenterAchievementVersion: GameCenterAchievementVersion? = nil, + gameCenterActivityVersion: GameCenterActivityVersion? = nil, + gameCenterChallengeVersion: GameCenterChallengeVersion? = nil, + gameCenterLeaderboardSetVersion: GameCenterLeaderboardSetVersion? = nil, + gameCenterLeaderboardVersion: GameCenterLeaderboardVersion? = nil, reviewSubmission: ReviewSubmission ) { self.appCustomProductPageVersion = appCustomProductPageVersion @@ -66,6 +81,11 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable, Sendable { self.appStoreVersionExperiment = appStoreVersionExperiment self.appStoreVersionExperimentV2 = appStoreVersionExperimentV2 self.backgroundAssetVersion = backgroundAssetVersion + self.gameCenterAchievementVersion = gameCenterAchievementVersion + self.gameCenterActivityVersion = gameCenterActivityVersion + self.gameCenterChallengeVersion = gameCenterChallengeVersion + self.gameCenterLeaderboardSetVersion = gameCenterLeaderboardSetVersion + self.gameCenterLeaderboardVersion = gameCenterLeaderboardVersion self.reviewSubmission = reviewSubmission } @@ -76,6 +96,11 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable, Sendable { case appStoreVersionExperiment case appStoreVersionExperimentV2 case backgroundAssetVersion + case gameCenterAchievementVersion + case gameCenterActivityVersion + case gameCenterChallengeVersion + case gameCenterLeaderboardSetVersion + case gameCenterLeaderboardVersion case reviewSubmission } @@ -289,6 +314,181 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable, Sendable { } } + public struct GameCenterAchievementVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } + } + + public struct GameCenterActivityVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } + } + + public struct GameCenterChallengeVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + + public struct GameCenterLeaderboardSetVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } + } + + public struct GameCenterLeaderboardVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } + } + public struct ReviewSubmission: Hashable, Codable, Sendable { public var data: Data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift index 0227e080..de48c70e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift @@ -49,6 +49,8 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable, Sendable { } public struct Attributes: Hashable, Codable, Sendable { + public var autoRenewEnabled: Bool? + public var customerEligibilities: [SubscriptionCustomerEligibility] public var duration: SubscriptionOfferDuration @@ -62,6 +64,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable, Sendable { public var offerMode: SubscriptionOfferMode public init( + autoRenewEnabled: Bool? = nil, customerEligibilities: [SubscriptionCustomerEligibility], duration: SubscriptionOfferDuration, name: String, @@ -69,6 +72,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable, Sendable { offerEligibility: SubscriptionOfferEligibility, offerMode: SubscriptionOfferMode ) { + self.autoRenewEnabled = autoRenewEnabled self.customerEligibilities = customerEligibilities self.duration = duration self.name = name @@ -78,6 +82,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable, Sendable { } private enum CodingKeys: String, CodingKey { + case autoRenewEnabled case customerEligibilities case duration case name diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift index 281a5d36..b3cc82d3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift @@ -42,19 +42,24 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl } public struct Attributes: Hashable, Codable, Sendable { + public var environment: OfferCodeEnvironment? + public var expirationDate: String public var numberOfCodes: Int public init( + environment: OfferCodeEnvironment? = nil, expirationDate: String, numberOfCodes: Int ) { + self.environment = environment self.expirationDate = expirationDate self.numberOfCodes = numberOfCodes } private enum CodingKeys: String, CodingKey { + case environment case expirationDate case numberOfCodes } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AndroidToIosAppMappingDetailResponse.generated.swift similarity index 65% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AndroidToIosAppMappingDetailResponse.generated.swift index 5156cfd2..8fea0a3d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AndroidToIosAppMappingDetailResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct RoutingAppCoverageWithoutIncludesResponse: Hashable, Codable, Sendable { - public var data: RoutingAppCoverage +public struct AndroidToIosAppMappingDetailResponse: Hashable, Codable, Sendable { + public var data: AndroidToIosAppMappingDetail public var links: DocumentLinks public init( - data: RoutingAppCoverage, + data: AndroidToIosAppMappingDetail, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AndroidToIosAppMappingDetailsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AndroidToIosAppMappingDetailsResponse.generated.swift new file mode 100644 index 00000000..59fb5af1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AndroidToIosAppMappingDetailsResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AndroidToIosAppMappingDetailsResponse: Hashable, Codable, Sendable { + public var data: [AndroidToIosAppMappingDetail] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AndroidToIosAppMappingDetail], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAndroidToIosAppMappingDetailsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAndroidToIosAppMappingDetailsLinkagesResponse.generated.swift new file mode 100644 index 00000000..2fb036dc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAndroidToIosAppMappingDetailsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAndroidToIosAppMappingDetailsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case androidToIosAppMappingDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift index 502139b2..18667909 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift @@ -27,6 +27,7 @@ public struct AppResponse: Hashable, Codable, Sendable { } public enum Included: Hashable, Codable, Sendable { + case androidToIosAppMappingDetail(AndroidToIosAppMappingDetail) case appClip(AppClip) case appCustomProductPage(AppCustomProductPage) case appEncryptionDeclaration(AppEncryptionDeclaration) @@ -38,6 +39,7 @@ public struct AppResponse: Hashable, Codable, Sendable { case betaAppReviewDetail(BetaAppReviewDetail) case betaGroup(BetaGroup) case betaLicenseAgreement(BetaLicenseAgreement) + case buildIcon(BuildIcon) case build(Build) case ciProduct(CiProduct) case endUserLicenseAgreement(EndUserLicenseAgreement) @@ -53,6 +55,11 @@ public struct AppResponse: Hashable, Codable, Sendable { public init(from decoder: Decoder) throws { self = try { var lastError: Error! + do { + return .androidToIosAppMappingDetail(try AndroidToIosAppMappingDetail(from: decoder)) + } catch { + lastError = error + } do { return .appClip(try AppClip(from: decoder)) } catch { @@ -108,6 +115,11 @@ public struct AppResponse: Hashable, Codable, Sendable { } catch { lastError = error } + do { + return .buildIcon(try BuildIcon(from: decoder)) + } catch { + lastError = error + } do { return .build(try Build(from: decoder)) } catch { @@ -169,6 +181,9 @@ public struct AppResponse: Hashable, Codable, Sendable { public func encode(to encoder: Encoder) throws { switch self { + case .androidToIosAppMappingDetail(let value): + try value.encode(to: encoder) + case .appClip(let value): try value.encode(to: encoder) @@ -202,6 +217,9 @@ public struct AppResponse: Hashable, Codable, Sendable { case .betaLicenseAgreement(let value): try value.encode(to: encoder) + case .buildIcon(let value): + try value.encode(to: encoder) + case .build(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift index 56d59c90..03e99be0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift @@ -32,6 +32,7 @@ public struct AppsResponse: Hashable, Codable, Sendable { } public enum Included: Hashable, Codable, Sendable { + case androidToIosAppMappingDetail(AndroidToIosAppMappingDetail) case appClip(AppClip) case appCustomProductPage(AppCustomProductPage) case appEncryptionDeclaration(AppEncryptionDeclaration) @@ -43,6 +44,7 @@ public struct AppsResponse: Hashable, Codable, Sendable { case betaAppReviewDetail(BetaAppReviewDetail) case betaGroup(BetaGroup) case betaLicenseAgreement(BetaLicenseAgreement) + case buildIcon(BuildIcon) case build(Build) case ciProduct(CiProduct) case endUserLicenseAgreement(EndUserLicenseAgreement) @@ -58,6 +60,11 @@ public struct AppsResponse: Hashable, Codable, Sendable { public init(from decoder: Decoder) throws { self = try { var lastError: Error! + do { + return .androidToIosAppMappingDetail(try AndroidToIosAppMappingDetail(from: decoder)) + } catch { + lastError = error + } do { return .appClip(try AppClip(from: decoder)) } catch { @@ -113,6 +120,11 @@ public struct AppsResponse: Hashable, Codable, Sendable { } catch { lastError = error } + do { + return .buildIcon(try BuildIcon(from: decoder)) + } catch { + lastError = error + } do { return .build(try Build(from: decoder)) } catch { @@ -174,6 +186,9 @@ public struct AppsResponse: Hashable, Codable, Sendable { public func encode(to encoder: Encoder) throws { switch self { + case .androidToIosAppMappingDetail(let value): + try value.encode(to: encoder) + case .appClip(let value): try value.encode(to: encoder) @@ -207,6 +222,9 @@ public struct AppsResponse: Hashable, Codable, Sendable { case .betaLicenseAgreement(let value): try value.encode(to: encoder) + case .buildIcon(let value): + try value.encode(to: encoder) + case .build(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageV2Response.generated.swift new file mode 100644 index 00000000..9100f4dd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageV2Response.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementImageV2Response: Hashable, Codable, Sendable { + public var data: GameCenterAchievementImageV2 + + public var included: [GameCenterAchievementLocalizationV2]? + + public var links: DocumentLinks + + public init( + data: GameCenterAchievementImageV2, + included: [GameCenterAchievementLocalizationV2]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationV2ImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationV2ImageLinkageResponse.generated.swift new file mode 100644 index 00000000..cda5f001 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationV2ImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationV2ImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationV2Response.generated.swift new file mode 100644 index 00000000..fd11d837 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationV2Response.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationV2Response: Hashable, Codable, Sendable { + public var data: GameCenterAchievementLocalizationV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterAchievementLocalizationV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterAchievementImageV2(GameCenterAchievementImageV2) + case gameCenterAchievementVersionV2(GameCenterAchievementVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterAchievementImageV2(try GameCenterAchievementImageV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterAchievementVersionV2(try GameCenterAchievementVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterAchievementImageV2(let value): + try value.encode(to: encoder) + + case .gameCenterAchievementVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsV2Response.generated.swift new file mode 100644 index 00000000..4126aea1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsV2Response.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterAchievementLocalizationV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterAchievementLocalizationV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterAchievementImageV2(GameCenterAchievementImageV2) + case gameCenterAchievementVersionV2(GameCenterAchievementVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterAchievementImageV2(try GameCenterAchievementImageV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterAchievementVersionV2(try GameCenterAchievementVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterAchievementImageV2(let value): + try value.encode(to: encoder) + + case .gameCenterAchievementVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementV2Response.generated.swift new file mode 100644 index 00000000..4398d37f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementV2Response.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementV2Response: Hashable, Codable, Sendable { + public var data: GameCenterAchievementV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterAchievementV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterAchievementVersionV2(GameCenterAchievementVersionV2) + case gameCenterActivity(GameCenterActivity) + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterAchievementVersionV2(try GameCenterAchievementVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterAchievementVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementV2VersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementV2VersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..3e48f820 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementV2VersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementV2VersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionV2LocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionV2LocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..bae75b34 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionV2LocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementVersionV2LocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionV2Response.generated.swift new file mode 100644 index 00000000..6993ddcf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionV2Response.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementVersionV2Response: Hashable, Codable, Sendable { + public var data: GameCenterAchievementVersionV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterAchievementVersionV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterAchievementLocalizationV2(GameCenterAchievementLocalizationV2) + case gameCenterAchievementV2(GameCenterAchievementV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterAchievementLocalizationV2(try GameCenterAchievementLocalizationV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterAchievementV2(try GameCenterAchievementV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterAchievementLocalizationV2(let value): + try value.encode(to: encoder) + + case .gameCenterAchievementV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionsV2Response.generated.swift new file mode 100644 index 00000000..479325e7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementVersionsV2Response.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementVersionsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterAchievementVersionV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterAchievementVersionV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterAchievementLocalizationV2(GameCenterAchievementLocalizationV2) + case gameCenterAchievementV2(GameCenterAchievementV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterAchievementLocalizationV2(try GameCenterAchievementLocalizationV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterAchievementV2(try GameCenterAchievementV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterAchievementLocalizationV2(let value): + try value.encode(to: encoder) + + case .gameCenterAchievementV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsV2Response.generated.swift new file mode 100644 index 00000000..01a6610f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsV2Response.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterAchievementV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterAchievementV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterAchievementVersionV2(GameCenterAchievementVersionV2) + case gameCenterActivity(GameCenterActivity) + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterAchievementVersionV2(try GameCenterAchievementVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterAchievementVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..76fd6cc6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterAchievementsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..0791cc97 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterLeaderboardSetsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..a2f63b79 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterLeaderboardsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..2c14ec9d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterAchievementsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..5c951946 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterLeaderboardSetsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..70050cf0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterLeaderboardsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageV2Response.generated.swift new file mode 100644 index 00000000..8b391d26 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageV2Response.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardImageV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardImageV2 + + public var included: [GameCenterLeaderboardLocalizationV2]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardImageV2, + included: [GameCenterLeaderboardLocalizationV2]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationV2ImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationV2ImageLinkageResponse.generated.swift new file mode 100644 index 00000000..a3bc5d16 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationV2ImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationV2ImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationV2Response.generated.swift new file mode 100644 index 00000000..11d1aef6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationV2Response.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardLocalizationV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardLocalizationV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardImageV2(GameCenterLeaderboardImageV2) + case gameCenterLeaderboardVersionV2(GameCenterLeaderboardVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardImageV2(try GameCenterLeaderboardImageV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardVersionV2(try GameCenterLeaderboardVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardImageV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsV2Response.generated.swift new file mode 100644 index 00000000..74ca3a45 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsV2Response.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterLeaderboardLocalizationV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterLeaderboardLocalizationV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardImageV2(GameCenterLeaderboardImageV2) + case gameCenterLeaderboardVersionV2(GameCenterLeaderboardVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardImageV2(try GameCenterLeaderboardImageV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardVersionV2(try GameCenterLeaderboardVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardImageV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageV2Response.generated.swift new file mode 100644 index 00000000..25291d95 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageV2Response.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetImageV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardSetImageV2 + + public var included: [GameCenterLeaderboardSetLocalizationV2]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardSetImageV2, + included: [GameCenterLeaderboardSetLocalizationV2]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse.generated.swift new file mode 100644 index 00000000..09bab8a4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationV2ImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationV2Response.generated.swift new file mode 100644 index 00000000..86dcc41c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationV2Response.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardSetLocalizationV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardSetLocalizationV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImageV2(GameCenterLeaderboardSetImageV2) + case gameCenterLeaderboardSetVersionV2(GameCenterLeaderboardSetVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardSetImageV2(try GameCenterLeaderboardSetImageV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetVersionV2(try GameCenterLeaderboardSetVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardSetImageV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsV2Response.generated.swift new file mode 100644 index 00000000..cd62dda6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsV2Response.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterLeaderboardSetLocalizationV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterLeaderboardSetLocalizationV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImageV2(GameCenterLeaderboardSetImageV2) + case gameCenterLeaderboardSetVersionV2(GameCenterLeaderboardSetVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardSetImageV2(try GameCenterLeaderboardSetImageV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetVersionV2(try GameCenterLeaderboardSetVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardSetImageV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse.generated.swift new file mode 100644 index 00000000..66e66924 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2GameCenterLeaderboardsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2Response.generated.swift new file mode 100644 index 00000000..1ef27419 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2Response.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardSetV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardSetV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterLeaderboardSetVersionV2(GameCenterLeaderboardSetVersionV2) + case gameCenterLeaderboardV2(GameCenterLeaderboardV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetVersionV2(try GameCenterLeaderboardSetVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardV2(try GameCenterLeaderboardV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2VersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2VersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..24f74786 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetV2VersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetV2VersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..ccaac558 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetVersionV2LocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionV2Response.generated.swift new file mode 100644 index 00000000..b86549f5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionV2Response.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetVersionV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardSetVersionV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardSetVersionV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizationV2(GameCenterLeaderboardSetLocalizationV2) + case gameCenterLeaderboardSetV2(GameCenterLeaderboardSetV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardSetLocalizationV2(try GameCenterLeaderboardSetLocalizationV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetV2(try GameCenterLeaderboardSetV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardSetLocalizationV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionsV2Response.generated.swift new file mode 100644 index 00000000..3c535610 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetVersionsV2Response.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetVersionsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterLeaderboardSetVersionV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterLeaderboardSetVersionV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizationV2(GameCenterLeaderboardSetLocalizationV2) + case gameCenterLeaderboardSetV2(GameCenterLeaderboardSetV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardSetLocalizationV2(try GameCenterLeaderboardSetLocalizationV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetV2(try GameCenterLeaderboardSetV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardSetLocalizationV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsV2Response.generated.swift new file mode 100644 index 00000000..1706cb2b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsV2Response.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterLeaderboardSetV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterLeaderboardSetV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterLeaderboardSetVersionV2(GameCenterLeaderboardSetVersionV2) + case gameCenterLeaderboardV2(GameCenterLeaderboardV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetVersionV2(try GameCenterLeaderboardSetVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardV2(try GameCenterLeaderboardV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardV2Response.generated.swift new file mode 100644 index 00000000..06de991b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardV2Response.generated.swift @@ -0,0 +1,98 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterLeaderboardSetV2(GameCenterLeaderboardSetV2) + case gameCenterLeaderboardVersionV2(GameCenterLeaderboardVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetV2(try GameCenterLeaderboardSetV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardVersionV2(try GameCenterLeaderboardVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) + + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardV2VersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardV2VersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..0fd2664b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardV2VersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardV2VersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..eea2d19c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardVersionV2LocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionV2Response.generated.swift new file mode 100644 index 00000000..33f0b0fd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionV2Response.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardVersionV2Response: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardVersionV2 + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardVersionV2, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizationV2(GameCenterLeaderboardLocalizationV2) + case gameCenterLeaderboardV2(GameCenterLeaderboardV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardLocalizationV2(try GameCenterLeaderboardLocalizationV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardV2(try GameCenterLeaderboardV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardLocalizationV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionsV2Response.generated.swift new file mode 100644 index 00000000..de660a2a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardVersionsV2Response.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardVersionsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterLeaderboardVersionV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterLeaderboardVersionV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizationV2(GameCenterLeaderboardLocalizationV2) + case gameCenterLeaderboardV2(GameCenterLeaderboardV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterLeaderboardLocalizationV2(try GameCenterLeaderboardLocalizationV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardV2(try GameCenterLeaderboardV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterLeaderboardLocalizationV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsV2Response.generated.swift new file mode 100644 index 00000000..117c9ef8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsV2Response.generated.swift @@ -0,0 +1,103 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardsV2Response: Hashable, Codable, Sendable { + public var data: [GameCenterLeaderboardV2] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterLeaderboardV2], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterLeaderboardSetV2(GameCenterLeaderboardSetV2) + case gameCenterLeaderboardVersionV2(GameCenterLeaderboardVersionV2) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetV2(try GameCenterLeaderboardSetV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardVersionV2(try GameCenterLeaderboardVersionV2(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) + + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardVersionV2(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodeResponse.generated.swift new file mode 100644 index 00000000..4a77185f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodeResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCustomCodeResponse: Hashable, Codable, Sendable { + public var data: InAppPurchaseOfferCodeCustomCode + + public var included: [Actor]? + + public var links: DocumentLinks + + public init( + data: InAppPurchaseOfferCodeCustomCode, + included: [Actor]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodesLinkagesResponse.generated.swift new file mode 100644 index 00000000..5884b30e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCustomCodesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCodes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodesResponse.generated.swift new file mode 100644 index 00000000..87920f44 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeCustomCodesResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeCustomCodesResponse: Hashable, Codable, Sendable { + public var data: [InAppPurchaseOfferCodeCustomCode] + + public var included: [Actor]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [InAppPurchaseOfferCodeCustomCode], + included: [Actor]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodeResponse.generated.swift new file mode 100644 index 00000000..5e24be96 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodeResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodeResponse: Hashable, Codable, Sendable { + public var data: InAppPurchaseOfferCodeOneTimeUseCode + + public var included: [Actor]? + + public var links: DocumentLinks + + public init( + data: InAppPurchaseOfferCodeOneTimeUseCode, + included: [Actor]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift new file mode 100644 index 00000000..e185b178 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodeValuesLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodeValues + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift new file mode 100644 index 00000000..60b01867 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeOneTimeUseCodes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodesResponse.generated.swift new file mode 100644 index 00000000..991351f5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeOneTimeUseCodesResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeOneTimeUseCodesResponse: Hashable, Codable, Sendable { + public var data: [InAppPurchaseOfferCodeOneTimeUseCode] + + public var included: [Actor]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [InAppPurchaseOfferCodeOneTimeUseCode], + included: [Actor]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodePricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodePricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..1b8b380c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodePricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodePricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferPrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeResponse.generated.swift new file mode 100644 index 00000000..2c0eb93b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodeResponse.generated.swift @@ -0,0 +1,71 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodeResponse: Hashable, Codable, Sendable { + public var data: InAppPurchaseOfferCode + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: InAppPurchaseOfferCode, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCode(InAppPurchaseOfferCodeCustomCode) + case inAppPurchaseOfferCodeOneTimeUseCode(InAppPurchaseOfferCodeOneTimeUseCode) + case inAppPurchaseOfferPrice(InAppPurchaseOfferPrice) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .inAppPurchaseOfferCodeCustomCode(try InAppPurchaseOfferCodeCustomCode(from: decoder)) + } catch { + lastError = error + } + do { + return .inAppPurchaseOfferCodeOneTimeUseCode(try InAppPurchaseOfferCodeOneTimeUseCode(from: decoder)) + } catch { + lastError = error + } + do { + return .inAppPurchaseOfferPrice(try InAppPurchaseOfferPrice(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .inAppPurchaseOfferCodeCustomCode(let value): + try value.encode(to: encoder) + + case .inAppPurchaseOfferCodeOneTimeUseCode(let value): + try value.encode(to: encoder) + + case .inAppPurchaseOfferPrice(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodesResponse.generated.swift new file mode 100644 index 00000000..2c8d1f57 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferCodesResponse.generated.swift @@ -0,0 +1,76 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferCodesResponse: Hashable, Codable, Sendable { + public var data: [InAppPurchaseOfferCode] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [InAppPurchaseOfferCode], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case inAppPurchaseOfferCodeCustomCode(InAppPurchaseOfferCodeCustomCode) + case inAppPurchaseOfferCodeOneTimeUseCode(InAppPurchaseOfferCodeOneTimeUseCode) + case inAppPurchaseOfferPrice(InAppPurchaseOfferPrice) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .inAppPurchaseOfferCodeCustomCode(try InAppPurchaseOfferCodeCustomCode(from: decoder)) + } catch { + lastError = error + } + do { + return .inAppPurchaseOfferCodeOneTimeUseCode(try InAppPurchaseOfferCodeOneTimeUseCode(from: decoder)) + } catch { + lastError = error + } + do { + return .inAppPurchaseOfferPrice(try InAppPurchaseOfferPrice(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .inAppPurchaseOfferCodeCustomCode(let value): + try value.encode(to: encoder) + + case .inAppPurchaseOfferCodeOneTimeUseCode(let value): + try value.encode(to: encoder) + + case .inAppPurchaseOfferPrice(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferPricesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferPricesResponse.generated.swift new file mode 100644 index 00000000..17a899fb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseOfferPricesResponse.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseOfferPricesResponse: Hashable, Codable, Sendable { + public var data: [InAppPurchaseOfferPrice] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [InAppPurchaseOfferPrice], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case inAppPurchasePricePoint(InAppPurchasePricePoint) + case territory(Territory) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .inAppPurchasePricePoint(try InAppPurchasePricePoint(from: decoder)) + } catch { + lastError = error + } + do { + return .territory(try Territory(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .inAppPurchasePricePoint(let value): + try value.encode(to: encoder) + + case .territory(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2OfferCodesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2OfferCodesLinkagesResponse.generated.swift new file mode 100644 index 00000000..87e87c79 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2OfferCodesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2OfferCodesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseOfferCodes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift index dd246af7..75a0c048 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift @@ -32,6 +32,7 @@ public struct InAppPurchaseV2Response: Hashable, Codable, Sendable { case inAppPurchaseContent(InAppPurchaseContent) case inAppPurchaseImage(InAppPurchaseImage) case inAppPurchaseLocalization(InAppPurchaseLocalization) + case inAppPurchaseOfferCode(InAppPurchaseOfferCode) case inAppPurchasePricePoint(InAppPurchasePricePoint) case inAppPurchasePriceSchedule(InAppPurchasePriceSchedule) case promotedPurchase(PromotedPurchase) @@ -64,6 +65,11 @@ public struct InAppPurchaseV2Response: Hashable, Codable, Sendable { } catch { lastError = error } + do { + return .inAppPurchaseOfferCode(try InAppPurchaseOfferCode(from: decoder)) + } catch { + lastError = error + } do { return .inAppPurchasePricePoint(try InAppPurchasePricePoint(from: decoder)) } catch { @@ -100,6 +106,9 @@ public struct InAppPurchaseV2Response: Hashable, Codable, Sendable { case .inAppPurchaseLocalization(let value): try value.encode(to: encoder) + case .inAppPurchaseOfferCode(let value): + try value.encode(to: encoder) + case .inAppPurchasePricePoint(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift index dae27ce3..8e60f60d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift @@ -37,6 +37,7 @@ public struct InAppPurchasesV2Response: Hashable, Codable, Sendable { case inAppPurchaseContent(InAppPurchaseContent) case inAppPurchaseImage(InAppPurchaseImage) case inAppPurchaseLocalization(InAppPurchaseLocalization) + case inAppPurchaseOfferCode(InAppPurchaseOfferCode) case inAppPurchasePricePoint(InAppPurchasePricePoint) case inAppPurchasePriceSchedule(InAppPurchasePriceSchedule) case promotedPurchase(PromotedPurchase) @@ -69,6 +70,11 @@ public struct InAppPurchasesV2Response: Hashable, Codable, Sendable { } catch { lastError = error } + do { + return .inAppPurchaseOfferCode(try InAppPurchaseOfferCode(from: decoder)) + } catch { + lastError = error + } do { return .inAppPurchasePricePoint(try InAppPurchasePricePoint(from: decoder)) } catch { @@ -105,6 +111,9 @@ public struct InAppPurchasesV2Response: Hashable, Codable, Sendable { case .inAppPurchaseLocalization(let value): try value.encode(to: encoder) + case .inAppPurchaseOfferCode(let value): + try value.encode(to: encoder) + case .inAppPurchasePricePoint(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift index 3ddac307..e3f37bec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift @@ -32,6 +32,11 @@ public struct ReviewSubmissionItemResponse: Hashable, Codable, Sendable { case appStoreVersionExperiment(AppStoreVersionExperiment) case appStoreVersion(AppStoreVersion) case backgroundAssetVersion(BackgroundAssetVersion) + case gameCenterAchievementVersionV2(GameCenterAchievementVersionV2) + case gameCenterActivityVersion(GameCenterActivityVersion) + case gameCenterChallengeVersion(GameCenterChallengeVersion) + case gameCenterLeaderboardSetVersionV2(GameCenterLeaderboardSetVersionV2) + case gameCenterLeaderboardVersionV2(GameCenterLeaderboardVersionV2) public init(from decoder: Decoder) throws { self = try { @@ -61,6 +66,31 @@ public struct ReviewSubmissionItemResponse: Hashable, Codable, Sendable { } catch { lastError = error } + do { + return .gameCenterAchievementVersionV2(try GameCenterAchievementVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityVersion(try GameCenterActivityVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersion(try GameCenterChallengeVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetVersionV2(try GameCenterLeaderboardSetVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardVersionV2(try GameCenterLeaderboardVersionV2(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -81,6 +111,21 @@ public struct ReviewSubmissionItemResponse: Hashable, Codable, Sendable { case .backgroundAssetVersion(let value): try value.encode(to: encoder) + + case .gameCenterAchievementVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterActivityVersion(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersion(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardVersionV2(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift index 36d4f90b..3fde252c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift @@ -37,6 +37,11 @@ public struct ReviewSubmissionItemsResponse: Hashable, Codable, Sendable { case appStoreVersionExperiment(AppStoreVersionExperiment) case appStoreVersion(AppStoreVersion) case backgroundAssetVersion(BackgroundAssetVersion) + case gameCenterAchievementVersionV2(GameCenterAchievementVersionV2) + case gameCenterActivityVersion(GameCenterActivityVersion) + case gameCenterChallengeVersion(GameCenterChallengeVersion) + case gameCenterLeaderboardSetVersionV2(GameCenterLeaderboardSetVersionV2) + case gameCenterLeaderboardVersionV2(GameCenterLeaderboardVersionV2) public init(from decoder: Decoder) throws { self = try { @@ -66,6 +71,31 @@ public struct ReviewSubmissionItemsResponse: Hashable, Codable, Sendable { } catch { lastError = error } + do { + return .gameCenterAchievementVersionV2(try GameCenterAchievementVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityVersion(try GameCenterActivityVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersion(try GameCenterChallengeVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardSetVersionV2(try GameCenterLeaderboardSetVersionV2(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboardVersionV2(try GameCenterLeaderboardVersionV2(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -86,6 +116,21 @@ public struct ReviewSubmissionItemsResponse: Hashable, Codable, Sendable { case .backgroundAssetVersion(let value): try value.encode(to: encoder) + + case .gameCenterAchievementVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterActivityVersion(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersion(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardSetVersionV2(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboardVersionV2(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift index c197f956..321ebbad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift @@ -97,13 +97,28 @@ public struct ReviewSubmissionItem: Hashable, Codable, Sendable { public var backgroundAssetVersion: BackgroundAssetVersion? + public var gameCenterAchievementVersion: GameCenterAchievementVersion? + + public var gameCenterActivityVersion: GameCenterActivityVersion? + + public var gameCenterChallengeVersion: GameCenterChallengeVersion? + + public var gameCenterLeaderboardSetVersion: GameCenterLeaderboardSetVersion? + + public var gameCenterLeaderboardVersion: GameCenterLeaderboardVersion? + public init( appCustomProductPageVersion: AppCustomProductPageVersion? = nil, appEvent: AppEvent? = nil, appStoreVersion: AppStoreVersion? = nil, appStoreVersionExperiment: AppStoreVersionExperiment? = nil, appStoreVersionExperimentV2: AppStoreVersionExperimentV2? = nil, - backgroundAssetVersion: BackgroundAssetVersion? = nil + backgroundAssetVersion: BackgroundAssetVersion? = nil, + gameCenterAchievementVersion: GameCenterAchievementVersion? = nil, + gameCenterActivityVersion: GameCenterActivityVersion? = nil, + gameCenterChallengeVersion: GameCenterChallengeVersion? = nil, + gameCenterLeaderboardSetVersion: GameCenterLeaderboardSetVersion? = nil, + gameCenterLeaderboardVersion: GameCenterLeaderboardVersion? = nil ) { self.appCustomProductPageVersion = appCustomProductPageVersion self.appEvent = appEvent @@ -111,6 +126,11 @@ public struct ReviewSubmissionItem: Hashable, Codable, Sendable { self.appStoreVersionExperiment = appStoreVersionExperiment self.appStoreVersionExperimentV2 = appStoreVersionExperimentV2 self.backgroundAssetVersion = backgroundAssetVersion + self.gameCenterAchievementVersion = gameCenterAchievementVersion + self.gameCenterActivityVersion = gameCenterActivityVersion + self.gameCenterChallengeVersion = gameCenterChallengeVersion + self.gameCenterLeaderboardSetVersion = gameCenterLeaderboardSetVersion + self.gameCenterLeaderboardVersion = gameCenterLeaderboardVersion } private enum CodingKeys: String, CodingKey { @@ -120,6 +140,11 @@ public struct ReviewSubmissionItem: Hashable, Codable, Sendable { case appStoreVersionExperiment case appStoreVersionExperimentV2 case backgroundAssetVersion + case gameCenterAchievementVersion + case gameCenterActivityVersion + case gameCenterChallengeVersion + case gameCenterLeaderboardSetVersion + case gameCenterLeaderboardVersion } public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { @@ -331,6 +356,181 @@ public struct ReviewSubmissionItem: Hashable, Codable, Sendable { } } } + + public struct GameCenterAchievementVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementVersions + } + } + } + + public struct GameCenterActivityVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } + } + + public struct GameCenterChallengeVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + + public struct GameCenterLeaderboardSetVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetVersions + } + } + } + + public struct GameCenterLeaderboardVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardVersions + } + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift index b1cfc4b8..37cd2793 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift @@ -43,6 +43,8 @@ public struct SubscriptionOfferCode: Hashable, Codable, Sendable { public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? + public var autoRenewEnabled: Bool? + public var customerEligibilities: [SubscriptionCustomerEligibility]? public var duration: SubscriptionOfferDuration? @@ -55,36 +57,49 @@ public struct SubscriptionOfferCode: Hashable, Codable, Sendable { public var offerMode: SubscriptionOfferMode? + public var productionCodeCount: Int? + + public var sandboxCodeCount: Int? + public var totalNumberOfCodes: Int? public init( active: Bool? = nil, + autoRenewEnabled: Bool? = nil, customerEligibilities: [SubscriptionCustomerEligibility]? = nil, duration: SubscriptionOfferDuration? = nil, name: String? = nil, numberOfPeriods: Int? = nil, offerEligibility: SubscriptionOfferEligibility? = nil, offerMode: SubscriptionOfferMode? = nil, + productionCodeCount: Int? = nil, + sandboxCodeCount: Int? = nil, totalNumberOfCodes: Int? = nil ) { self.active = active + self.autoRenewEnabled = autoRenewEnabled self.customerEligibilities = customerEligibilities self.duration = duration self.name = name self.numberOfPeriods = numberOfPeriods self.offerEligibility = offerEligibility self.offerMode = offerMode + self.productionCodeCount = productionCodeCount + self.sandboxCodeCount = sandboxCodeCount self.totalNumberOfCodes = totalNumberOfCodes } private enum CodingKeys: String, CodingKey { case active + case autoRenewEnabled case customerEligibilities case duration case name case numberOfPeriods case offerEligibility case offerMode + case productionCodeCount + case sandboxCodeCount case totalNumberOfCodes } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift index 503e3bab..93474ead 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift @@ -45,6 +45,8 @@ public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable, Sendable { public var createdDate: String? + public var environment: OfferCodeEnvironment? + public var expirationDate: String? public var numberOfCodes: Int? @@ -52,11 +54,13 @@ public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable, Sendable { public init( active: Bool? = nil, createdDate: String? = nil, + environment: OfferCodeEnvironment? = nil, expirationDate: String? = nil, numberOfCodes: Int? = nil ) { self.active = active self.createdDate = createdDate + self.environment = environment self.expirationDate = expirationDate self.numberOfCodes = numberOfCodes } @@ -64,6 +68,7 @@ public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable, Sendable { private enum CodingKeys: String, CodingKey { case active case createdDate + case environment case expirationDate case numberOfCodes } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift index 2cf6066e..70cb175c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift @@ -916,6 +916,10 @@ public struct TerritoryCode: Hashable, Codable, RawRepresentable, CustomStringCo .init(rawValue: "WSM") } + public static var xks: Self { + .init(rawValue: "XKS") + } + public static var yem: Self { .init(rawValue: "YEM") } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift index 73c39a0d..021c7a39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift @@ -4,6 +4,18 @@ import Foundation public struct WebhookEventType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackageAvailableUpdated: Self { + .init(rawValue: "ALTERNATIVE_DISTRIBUTION_PACKAGE_AVAILABLE_UPDATED") + } + + public static var alternativeDistributionPackageVersionCreated: Self { + .init(rawValue: "ALTERNATIVE_DISTRIBUTION_PACKAGE_VERSION_CREATED") + } + + public static var alternativeDistributionTerritoryAvailabilityUpdated: Self { + .init(rawValue: "ALTERNATIVE_DISTRIBUTION_TERRITORY_AVAILABILITY_UPDATED") + } + public static var appStoreVersionAppVersionStateUpdated: Self { .init(rawValue: "APP_STORE_VERSION_APP_VERSION_STATE_UPDATED") }