Skip to content

Commit 76c3049

Browse files
authored
Merge pull request #276 from AvdLee/feature/updates-app-store-connect-api
Updates App Store Connect API spec to 3.5
2 parents bd4d549 + 248988b commit 76c3049

File tree

394 files changed

+5208
-14004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+5208
-14004
lines changed

Sources/OpenAPI/Generated/Entities/AgeRatingDeclarationWithoutIncludesResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
import Foundation
55

66
public struct AgeRatingDeclarationWithoutIncludesResponse: Codable {
7-
/// AppStoreVersion
8-
public var data: AppStoreVersion
7+
/// AgeRatingDeclaration
8+
public var data: AgeRatingDeclaration
99
public var links: DocumentLinks
1010

11-
public init(data: AppStoreVersion, links: DocumentLinks) {
11+
public init(data: AgeRatingDeclaration, links: DocumentLinks) {
1212
self.data = data
1313
self.links = links
1414
}
1515

1616
public init(from decoder: Decoder) throws {
1717
let values = try decoder.container(keyedBy: StringCodingKey.self)
18-
self.data = try values.decode(AppStoreVersion.self, forKey: "data")
18+
self.data = try values.decode(AgeRatingDeclaration.self, forKey: "data")
1919
self.links = try values.decode(DocumentLinks.self, forKey: "links")
2020
}
2121

Sources/OpenAPI/Generated/Entities/AlternativeDistributionKeyCreateRequest.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public struct AlternativeDistributionKeyCreateRequest: Codable {
99
public struct Data: Codable {
1010
public var type: `Type`
1111
public var attributes: Attributes
12-
public var relationships: Relationships
12+
public var relationships: Relationships?
1313

1414
public enum `Type`: String, Codable, CaseIterable {
1515
case alternativeDistributionKeys
@@ -34,10 +34,10 @@ public struct AlternativeDistributionKeyCreateRequest: Codable {
3434
}
3535

3636
public struct Relationships: Codable {
37-
public var app: App
37+
public var app: App?
3838

3939
public struct App: Codable {
40-
public var data: Data
40+
public var data: Data?
4141

4242
public struct Data: Codable, Identifiable {
4343
public var type: `Type`
@@ -65,37 +65,37 @@ public struct AlternativeDistributionKeyCreateRequest: Codable {
6565
}
6666
}
6767

68-
public init(data: Data) {
68+
public init(data: Data? = nil) {
6969
self.data = data
7070
}
7171

7272
public init(from decoder: Decoder) throws {
7373
let values = try decoder.container(keyedBy: StringCodingKey.self)
74-
self.data = try values.decode(Data.self, forKey: "data")
74+
self.data = try values.decodeIfPresent(Data.self, forKey: "data")
7575
}
7676

7777
public func encode(to encoder: Encoder) throws {
7878
var values = encoder.container(keyedBy: StringCodingKey.self)
79-
try values.encode(data, forKey: "data")
79+
try values.encodeIfPresent(data, forKey: "data")
8080
}
8181
}
8282

83-
public init(app: App) {
83+
public init(app: App? = nil) {
8484
self.app = app
8585
}
8686

8787
public init(from decoder: Decoder) throws {
8888
let values = try decoder.container(keyedBy: StringCodingKey.self)
89-
self.app = try values.decode(App.self, forKey: "app")
89+
self.app = try values.decodeIfPresent(App.self, forKey: "app")
9090
}
9191

9292
public func encode(to encoder: Encoder) throws {
9393
var values = encoder.container(keyedBy: StringCodingKey.self)
94-
try values.encode(app, forKey: "app")
94+
try values.encodeIfPresent(app, forKey: "app")
9595
}
9696
}
9797

98-
public init(type: `Type`, attributes: Attributes, relationships: Relationships) {
98+
public init(type: `Type`, attributes: Attributes, relationships: Relationships? = nil) {
9999
self.type = type
100100
self.attributes = attributes
101101
self.relationships = relationships
@@ -105,14 +105,14 @@ public struct AlternativeDistributionKeyCreateRequest: Codable {
105105
let values = try decoder.container(keyedBy: StringCodingKey.self)
106106
self.type = try values.decode(`Type`.self, forKey: "type")
107107
self.attributes = try values.decode(Attributes.self, forKey: "attributes")
108-
self.relationships = try values.decode(Relationships.self, forKey: "relationships")
108+
self.relationships = try values.decodeIfPresent(Relationships.self, forKey: "relationships")
109109
}
110110

111111
public func encode(to encoder: Encoder) throws {
112112
var values = encoder.container(keyedBy: StringCodingKey.self)
113113
try values.encode(type, forKey: "type")
114114
try values.encode(attributes, forKey: "attributes")
115-
try values.encode(relationships, forKey: "relationships")
115+
try values.encodeIfPresent(relationships, forKey: "relationships")
116116
}
117117
}
118118

Sources/OpenAPI/Generated/Entities/AppPriceTiersResponse.swift renamed to Sources/OpenAPI/Generated/Entities/AlternativeDistributionKeysResponse.swift

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,27 @@
33

44
import Foundation
55

6-
@available(*, deprecated, message: "Deprecated")
7-
public struct AppPriceTiersResponse: Codable {
8-
public var data: [AppPriceTier]
9-
public var included: [AppPricePoint]?
6+
public struct AlternativeDistributionKeysResponse: Codable {
7+
public var data: [AlternativeDistributionKey]
108
public var links: PagedDocumentLinks
119
public var meta: PagingInformation?
1210

13-
public init(data: [AppPriceTier], included: [AppPricePoint]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil) {
11+
public init(data: [AlternativeDistributionKey], links: PagedDocumentLinks, meta: PagingInformation? = nil) {
1412
self.data = data
15-
self.included = included
1613
self.links = links
1714
self.meta = meta
1815
}
1916

2017
public init(from decoder: Decoder) throws {
2118
let values = try decoder.container(keyedBy: StringCodingKey.self)
22-
self.data = try values.decode([AppPriceTier].self, forKey: "data")
23-
self.included = try values.decodeIfPresent([AppPricePoint].self, forKey: "included")
19+
self.data = try values.decode([AlternativeDistributionKey].self, forKey: "data")
2420
self.links = try values.decode(PagedDocumentLinks.self, forKey: "links")
2521
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta")
2622
}
2723

2824
public func encode(to encoder: Encoder) throws {
2925
var values = encoder.container(keyedBy: StringCodingKey.self)
3026
try values.encode(data, forKey: "data")
31-
try values.encodeIfPresent(included, forKey: "included")
3227
try values.encode(links, forKey: "links")
3328
try values.encodeIfPresent(meta, forKey: "meta")
3429
}

Sources/OpenAPI/Generated/Entities/App.swift

Lines changed: 2 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,14 @@ public struct App: Codable, Identifiable {
2424
public var subscriptionStatusURLVersion: SubscriptionStatusURLVersion?
2525
public var subscriptionStatusURLForSandbox: URL?
2626
public var subscriptionStatusURLVersionForSandbox: SubscriptionStatusURLVersion?
27-
/// - warning: Deprecated.
28-
public var isAvailableInNewTerritories: Bool?
2927
public var contentRightsDeclaration: ContentRightsDeclaration?
3028

3129
public enum ContentRightsDeclaration: String, Codable, CaseIterable {
3230
case doesNotUseThirdPartyContent = "DOES_NOT_USE_THIRD_PARTY_CONTENT"
3331
case usesThirdPartyContent = "USES_THIRD_PARTY_CONTENT"
3432
}
3533

36-
public init(name: String? = nil, bundleID: String? = nil, sku: String? = nil, primaryLocale: String? = nil, isOrEverWasMadeForKids: Bool? = nil, subscriptionStatusURL: URL? = nil, subscriptionStatusURLVersion: SubscriptionStatusURLVersion? = nil, subscriptionStatusURLForSandbox: URL? = nil, subscriptionStatusURLVersionForSandbox: SubscriptionStatusURLVersion? = nil, isAvailableInNewTerritories: Bool? = nil, contentRightsDeclaration: ContentRightsDeclaration? = nil) {
34+
public init(name: String? = nil, bundleID: String? = nil, sku: String? = nil, primaryLocale: String? = nil, isOrEverWasMadeForKids: Bool? = nil, subscriptionStatusURL: URL? = nil, subscriptionStatusURLVersion: SubscriptionStatusURLVersion? = nil, subscriptionStatusURLForSandbox: URL? = nil, subscriptionStatusURLVersionForSandbox: SubscriptionStatusURLVersion? = nil, contentRightsDeclaration: ContentRightsDeclaration? = nil) {
3735
self.name = name
3836
self.bundleID = bundleID
3937
self.sku = sku
@@ -43,7 +41,6 @@ public struct App: Codable, Identifiable {
4341
self.subscriptionStatusURLVersion = subscriptionStatusURLVersion
4442
self.subscriptionStatusURLForSandbox = subscriptionStatusURLForSandbox
4543
self.subscriptionStatusURLVersionForSandbox = subscriptionStatusURLVersionForSandbox
46-
self.isAvailableInNewTerritories = isAvailableInNewTerritories
4744
self.contentRightsDeclaration = contentRightsDeclaration
4845
}
4946

@@ -58,7 +55,6 @@ public struct App: Codable, Identifiable {
5855
self.subscriptionStatusURLVersion = try values.decodeIfPresent(SubscriptionStatusURLVersion.self, forKey: "subscriptionStatusUrlVersion")
5956
self.subscriptionStatusURLForSandbox = try values.decodeIfPresent(URL.self, forKey: "subscriptionStatusUrlForSandbox")
6057
self.subscriptionStatusURLVersionForSandbox = try values.decodeIfPresent(SubscriptionStatusURLVersion.self, forKey: "subscriptionStatusUrlVersionForSandbox")
61-
self.isAvailableInNewTerritories = try values.decodeIfPresent(Bool.self, forKey: "availableInNewTerritories")
6258
self.contentRightsDeclaration = try values.decodeIfPresent(ContentRightsDeclaration.self, forKey: "contentRightsDeclaration")
6359
}
6460

@@ -73,7 +69,6 @@ public struct App: Codable, Identifiable {
7369
try values.encodeIfPresent(subscriptionStatusURLVersion, forKey: "subscriptionStatusUrlVersion")
7470
try values.encodeIfPresent(subscriptionStatusURLForSandbox, forKey: "subscriptionStatusUrlForSandbox")
7571
try values.encodeIfPresent(subscriptionStatusURLVersionForSandbox, forKey: "subscriptionStatusUrlVersionForSandbox")
76-
try values.encodeIfPresent(isAvailableInNewTerritories, forKey: "availableInNewTerritories")
7772
try values.encodeIfPresent(contentRightsDeclaration, forKey: "contentRightsDeclaration")
7873
}
7974
}
@@ -93,10 +88,6 @@ public struct App: Codable, Identifiable {
9388
public var endUserLicenseAgreement: EndUserLicenseAgreement?
9489
public var preOrder: PreOrder?
9590
/// - warning: Deprecated.
96-
public var prices: Prices?
97-
/// - warning: Deprecated.
98-
public var availableTerritories: AvailableTerritories?
99-
/// - warning: Deprecated.
10091
public var inAppPurchases: InAppPurchases?
10192
public var subscriptionGroups: SubscriptionGroups?
10293
public var gameCenterEnabledVersions: GameCenterEnabledVersions?
@@ -1051,156 +1042,6 @@ public struct App: Codable, Identifiable {
10511042
}
10521043
}
10531044

1054-
@available(*, deprecated, message: "Deprecated")
1055-
public struct Prices: Codable {
1056-
public var links: Links?
1057-
public var meta: PagingInformation?
1058-
public var data: [Datum]?
1059-
1060-
public struct Links: Codable {
1061-
public var this: String?
1062-
public var related: String?
1063-
1064-
public init(this: String? = nil, related: String? = nil) {
1065-
self.this = this
1066-
self.related = related
1067-
}
1068-
1069-
public init(from decoder: Decoder) throws {
1070-
let values = try decoder.container(keyedBy: StringCodingKey.self)
1071-
self.this = try values.decodeIfPresent(String.self, forKey: "self")
1072-
self.related = try values.decodeIfPresent(String.self, forKey: "related")
1073-
}
1074-
1075-
public func encode(to encoder: Encoder) throws {
1076-
var values = encoder.container(keyedBy: StringCodingKey.self)
1077-
try values.encodeIfPresent(this, forKey: "self")
1078-
try values.encodeIfPresent(related, forKey: "related")
1079-
}
1080-
}
1081-
1082-
public struct Datum: Codable, Identifiable {
1083-
public var type: `Type`
1084-
public var id: String
1085-
1086-
public enum `Type`: String, Codable, CaseIterable {
1087-
case appPrices
1088-
}
1089-
1090-
public init(type: `Type`, id: String) {
1091-
self.type = type
1092-
self.id = id
1093-
}
1094-
1095-
public init(from decoder: Decoder) throws {
1096-
let values = try decoder.container(keyedBy: StringCodingKey.self)
1097-
self.type = try values.decode(`Type`.self, forKey: "type")
1098-
self.id = try values.decode(String.self, forKey: "id")
1099-
}
1100-
1101-
public func encode(to encoder: Encoder) throws {
1102-
var values = encoder.container(keyedBy: StringCodingKey.self)
1103-
try values.encode(type, forKey: "type")
1104-
try values.encode(id, forKey: "id")
1105-
}
1106-
}
1107-
1108-
public init(links: Links? = nil, meta: PagingInformation? = nil, data: [Datum]? = nil) {
1109-
self.links = links
1110-
self.meta = meta
1111-
self.data = data
1112-
}
1113-
1114-
public init(from decoder: Decoder) throws {
1115-
let values = try decoder.container(keyedBy: StringCodingKey.self)
1116-
self.links = try values.decodeIfPresent(Links.self, forKey: "links")
1117-
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta")
1118-
self.data = try values.decodeIfPresent([Datum].self, forKey: "data")
1119-
}
1120-
1121-
public func encode(to encoder: Encoder) throws {
1122-
var values = encoder.container(keyedBy: StringCodingKey.self)
1123-
try values.encodeIfPresent(links, forKey: "links")
1124-
try values.encodeIfPresent(meta, forKey: "meta")
1125-
try values.encodeIfPresent(data, forKey: "data")
1126-
}
1127-
}
1128-
1129-
@available(*, deprecated, message: "Deprecated")
1130-
public struct AvailableTerritories: Codable {
1131-
public var links: Links?
1132-
public var meta: PagingInformation?
1133-
public var data: [Datum]?
1134-
1135-
public struct Links: Codable {
1136-
public var this: String?
1137-
public var related: String?
1138-
1139-
public init(this: String? = nil, related: String? = nil) {
1140-
self.this = this
1141-
self.related = related
1142-
}
1143-
1144-
public init(from decoder: Decoder) throws {
1145-
let values = try decoder.container(keyedBy: StringCodingKey.self)
1146-
self.this = try values.decodeIfPresent(String.self, forKey: "self")
1147-
self.related = try values.decodeIfPresent(String.self, forKey: "related")
1148-
}
1149-
1150-
public func encode(to encoder: Encoder) throws {
1151-
var values = encoder.container(keyedBy: StringCodingKey.self)
1152-
try values.encodeIfPresent(this, forKey: "self")
1153-
try values.encodeIfPresent(related, forKey: "related")
1154-
}
1155-
}
1156-
1157-
public struct Datum: Codable, Identifiable {
1158-
public var type: `Type`
1159-
public var id: String
1160-
1161-
public enum `Type`: String, Codable, CaseIterable {
1162-
case territories
1163-
}
1164-
1165-
public init(type: `Type`, id: String) {
1166-
self.type = type
1167-
self.id = id
1168-
}
1169-
1170-
public init(from decoder: Decoder) throws {
1171-
let values = try decoder.container(keyedBy: StringCodingKey.self)
1172-
self.type = try values.decode(`Type`.self, forKey: "type")
1173-
self.id = try values.decode(String.self, forKey: "id")
1174-
}
1175-
1176-
public func encode(to encoder: Encoder) throws {
1177-
var values = encoder.container(keyedBy: StringCodingKey.self)
1178-
try values.encode(type, forKey: "type")
1179-
try values.encode(id, forKey: "id")
1180-
}
1181-
}
1182-
1183-
public init(links: Links? = nil, meta: PagingInformation? = nil, data: [Datum]? = nil) {
1184-
self.links = links
1185-
self.meta = meta
1186-
self.data = data
1187-
}
1188-
1189-
public init(from decoder: Decoder) throws {
1190-
let values = try decoder.container(keyedBy: StringCodingKey.self)
1191-
self.links = try values.decodeIfPresent(Links.self, forKey: "links")
1192-
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta")
1193-
self.data = try values.decodeIfPresent([Datum].self, forKey: "data")
1194-
}
1195-
1196-
public func encode(to encoder: Encoder) throws {
1197-
var values = encoder.container(keyedBy: StringCodingKey.self)
1198-
try values.encodeIfPresent(links, forKey: "links")
1199-
try values.encodeIfPresent(meta, forKey: "meta")
1200-
try values.encodeIfPresent(data, forKey: "data")
1201-
}
1202-
}
1203-
12041045
@available(*, deprecated, message: "Deprecated")
12051046
public struct InAppPurchases: Codable {
12061047
public var links: Links?
@@ -2008,7 +1849,7 @@ public struct App: Codable, Identifiable {
20081849
}
20091850
}
20101851

2011-
public init(appEncryptionDeclarations: AppEncryptionDeclarations? = nil, ciProduct: CiProduct? = nil, betaGroups: BetaGroups? = nil, appStoreVersions: AppStoreVersions? = nil, preReleaseVersions: PreReleaseVersions? = nil, betaAppLocalizations: BetaAppLocalizations? = nil, builds: Builds? = nil, betaLicenseAgreement: BetaLicenseAgreement? = nil, betaAppReviewDetail: BetaAppReviewDetail? = nil, appInfos: AppInfos? = nil, appClips: AppClips? = nil, endUserLicenseAgreement: EndUserLicenseAgreement? = nil, preOrder: PreOrder? = nil, prices: Prices? = nil, availableTerritories: AvailableTerritories? = nil, inAppPurchases: InAppPurchases? = nil, subscriptionGroups: SubscriptionGroups? = nil, gameCenterEnabledVersions: GameCenterEnabledVersions? = nil, appCustomProductPages: AppCustomProductPages? = nil, inAppPurchasesV2: InAppPurchasesV2? = nil, promotedPurchases: PromotedPurchases? = nil, appEvents: AppEvents? = nil, reviewSubmissions: ReviewSubmissions? = nil, subscriptionGracePeriod: SubscriptionGracePeriod? = nil, gameCenterDetail: GameCenterDetail? = nil, appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? = nil) {
1852+
public init(appEncryptionDeclarations: AppEncryptionDeclarations? = nil, ciProduct: CiProduct? = nil, betaGroups: BetaGroups? = nil, appStoreVersions: AppStoreVersions? = nil, preReleaseVersions: PreReleaseVersions? = nil, betaAppLocalizations: BetaAppLocalizations? = nil, builds: Builds? = nil, betaLicenseAgreement: BetaLicenseAgreement? = nil, betaAppReviewDetail: BetaAppReviewDetail? = nil, appInfos: AppInfos? = nil, appClips: AppClips? = nil, endUserLicenseAgreement: EndUserLicenseAgreement? = nil, preOrder: PreOrder? = nil, inAppPurchases: InAppPurchases? = nil, subscriptionGroups: SubscriptionGroups? = nil, gameCenterEnabledVersions: GameCenterEnabledVersions? = nil, appCustomProductPages: AppCustomProductPages? = nil, inAppPurchasesV2: InAppPurchasesV2? = nil, promotedPurchases: PromotedPurchases? = nil, appEvents: AppEvents? = nil, reviewSubmissions: ReviewSubmissions? = nil, subscriptionGracePeriod: SubscriptionGracePeriod? = nil, gameCenterDetail: GameCenterDetail? = nil, appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? = nil) {
20121853
self.appEncryptionDeclarations = appEncryptionDeclarations
20131854
self.ciProduct = ciProduct
20141855
self.betaGroups = betaGroups
@@ -2022,8 +1863,6 @@ public struct App: Codable, Identifiable {
20221863
self.appClips = appClips
20231864
self.endUserLicenseAgreement = endUserLicenseAgreement
20241865
self.preOrder = preOrder
2025-
self.prices = prices
2026-
self.availableTerritories = availableTerritories
20271866
self.inAppPurchases = inAppPurchases
20281867
self.subscriptionGroups = subscriptionGroups
20291868
self.gameCenterEnabledVersions = gameCenterEnabledVersions
@@ -2052,8 +1891,6 @@ public struct App: Codable, Identifiable {
20521891
self.appClips = try values.decodeIfPresent(AppClips.self, forKey: "appClips")
20531892
self.endUserLicenseAgreement = try values.decodeIfPresent(EndUserLicenseAgreement.self, forKey: "endUserLicenseAgreement")
20541893
self.preOrder = try values.decodeIfPresent(PreOrder.self, forKey: "preOrder")
2055-
self.prices = try values.decodeIfPresent(Prices.self, forKey: "prices")
2056-
self.availableTerritories = try values.decodeIfPresent(AvailableTerritories.self, forKey: "availableTerritories")
20571894
self.inAppPurchases = try values.decodeIfPresent(InAppPurchases.self, forKey: "inAppPurchases")
20581895
self.subscriptionGroups = try values.decodeIfPresent(SubscriptionGroups.self, forKey: "subscriptionGroups")
20591896
self.gameCenterEnabledVersions = try values.decodeIfPresent(GameCenterEnabledVersions.self, forKey: "gameCenterEnabledVersions")
@@ -2082,8 +1919,6 @@ public struct App: Codable, Identifiable {
20821919
try values.encodeIfPresent(appClips, forKey: "appClips")
20831920
try values.encodeIfPresent(endUserLicenseAgreement, forKey: "endUserLicenseAgreement")
20841921
try values.encodeIfPresent(preOrder, forKey: "preOrder")
2085-
try values.encodeIfPresent(prices, forKey: "prices")
2086-
try values.encodeIfPresent(availableTerritories, forKey: "availableTerritories")
20871922
try values.encodeIfPresent(inAppPurchases, forKey: "inAppPurchases")
20881923
try values.encodeIfPresent(subscriptionGroups, forKey: "subscriptionGroups")
20891924
try values.encodeIfPresent(gameCenterEnabledVersions, forKey: "gameCenterEnabledVersions")

0 commit comments

Comments
 (0)