Skip to content

Commit

Permalink
Merge branch 'master' into rate-limit-parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AvdLee authored Jul 5, 2023
2 parents a547788 + d0a314b commit 8c730a6
Show file tree
Hide file tree
Showing 154 changed files with 6,754 additions and 876 deletions.
13 changes: 13 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
dotenv (2.8.1)

PLATFORMS
universal-darwin-22

DEPENDENCIES
dotenv

BUNDLED WITH
2.2.8
81 changes: 81 additions & 0 deletions Sources/OpenAPI/Generated/Entities/Actor.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Generated by Create API
// https://github.com/CreateAPI/CreateAPI
//
// swiftlint:disable all

import Foundation

public struct Actor: Codable, Identifiable {
public var type: `Type`
public var id: String
public var attributes: Attributes?
public var links: ResourceLinks

public enum `Type`: String, Codable, CaseIterable {
case actors
}

public struct Attributes: Codable {
public var actorType: ActorType?
public var userFirstName: String?
public var userLastName: String?
public var userEmail: String?
public var apiKeyID: String?

public enum ActorType: String, Codable, CaseIterable {
case user = "USER"
case apiKey = "API_KEY"
case xcodeCloud = "XCODE_CLOUD"
case apple = "APPLE"
}

public init(actorType: ActorType? = nil, userFirstName: String? = nil, userLastName: String? = nil, userEmail: String? = nil, apiKeyID: String? = nil) {
self.actorType = actorType
self.userFirstName = userFirstName
self.userLastName = userLastName
self.userEmail = userEmail
self.apiKeyID = apiKeyID
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.actorType = try values.decodeIfPresent(ActorType.self, forKey: "actorType")
self.userFirstName = try values.decodeIfPresent(String.self, forKey: "userFirstName")
self.userLastName = try values.decodeIfPresent(String.self, forKey: "userLastName")
self.userEmail = try values.decodeIfPresent(String.self, forKey: "userEmail")
self.apiKeyID = try values.decodeIfPresent(String.self, forKey: "apiKeyId")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encodeIfPresent(actorType, forKey: "actorType")
try values.encodeIfPresent(userFirstName, forKey: "userFirstName")
try values.encodeIfPresent(userLastName, forKey: "userLastName")
try values.encodeIfPresent(userEmail, forKey: "userEmail")
try values.encodeIfPresent(apiKeyID, forKey: "apiKeyId")
}
}

public init(type: `Type`, id: String, attributes: Attributes? = nil, links: ResourceLinks) {
self.type = type
self.id = id
self.attributes = attributes
self.links = links
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.type = try values.decode(`Type`.self, forKey: "type")
self.id = try values.decode(String.self, forKey: "id")
self.attributes = try values.decodeIfPresent(Attributes.self, forKey: "attributes")
self.links = try values.decode(ResourceLinks.self, forKey: "links")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encode(type, forKey: "type")
try values.encode(id, forKey: "id")
try values.encodeIfPresent(attributes, forKey: "attributes")
try values.encode(links, forKey: "links")
}
}
29 changes: 29 additions & 0 deletions Sources/OpenAPI/Generated/Entities/ActorResponse.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Generated by Create API
// https://github.com/CreateAPI/CreateAPI
//
// swiftlint:disable all

import Foundation

public struct ActorResponse: Codable {
/// Actor
public var data: Actor
public var links: DocumentLinks

public init(data: Actor, links: DocumentLinks) {
self.data = data
self.links = links
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.data = try values.decode(Actor.self, forKey: "data")
self.links = try values.decode(DocumentLinks.self, forKey: "links")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encode(data, forKey: "data")
try values.encode(links, forKey: "links")
}
}
32 changes: 32 additions & 0 deletions Sources/OpenAPI/Generated/Entities/ActorsResponse.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Generated by Create API
// https://github.com/CreateAPI/CreateAPI
//
// swiftlint:disable all

import Foundation

public struct ActorsResponse: Codable {
public var data: [Actor]
public var links: PagedDocumentLinks
public var meta: PagingInformation?

public init(data: [Actor], links: PagedDocumentLinks, meta: PagingInformation? = nil) {
self.data = data
self.links = links
self.meta = meta
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.data = try values.decode([Actor].self, forKey: "data")
self.links = try values.decode(PagedDocumentLinks.self, forKey: "links")
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encode(data, forKey: "data")
try values.encode(links, forKey: "links")
try values.encodeIfPresent(meta, forKey: "meta")
}
}
80 changes: 79 additions & 1 deletion Sources/OpenAPI/Generated/Entities/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public struct App: Codable, Identifiable {
public var appEvents: AppEvents?
public var reviewSubmissions: ReviewSubmissions?
public var subscriptionGracePeriod: SubscriptionGracePeriod?
public var appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2?

public struct CiProduct: Codable {
public var links: Links?
Expand Down Expand Up @@ -1789,7 +1790,81 @@ public struct App: Codable, Identifiable {
}
}

public init(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) {
public struct AppStoreVersionExperimentsV2: Codable {
public var links: Links?
public var meta: PagingInformation?
public var data: [Datum]?

public struct Links: Codable {
public var this: String?
public var related: String?

public init(this: String? = nil, related: String? = nil) {
self.this = this
self.related = related
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.this = try values.decodeIfPresent(String.self, forKey: "self")
self.related = try values.decodeIfPresent(String.self, forKey: "related")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encodeIfPresent(this, forKey: "self")
try values.encodeIfPresent(related, forKey: "related")
}
}

public struct Datum: Codable, Identifiable {
public var type: `Type`
public var id: String

public enum `Type`: String, Codable, CaseIterable {
case appStoreVersionExperiments
}

public init(type: `Type`, id: String) {
self.type = type
self.id = id
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.type = try values.decode(`Type`.self, forKey: "type")
self.id = try values.decode(String.self, forKey: "id")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encode(type, forKey: "type")
try values.encode(id, forKey: "id")
}
}

public init(links: Links? = nil, meta: PagingInformation? = nil, data: [Datum]? = nil) {
self.links = links
self.meta = meta
self.data = data
}

public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: StringCodingKey.self)
self.links = try values.decodeIfPresent(Links.self, forKey: "links")
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta")
self.data = try values.decodeIfPresent([Datum].self, forKey: "data")
}

public func encode(to encoder: Encoder) throws {
var values = encoder.container(keyedBy: StringCodingKey.self)
try values.encodeIfPresent(links, forKey: "links")
try values.encodeIfPresent(meta, forKey: "meta")
try values.encodeIfPresent(data, forKey: "data")
}
}

public init(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, appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? = nil) {
self.ciProduct = ciProduct
self.betaGroups = betaGroups
self.appStoreVersions = appStoreVersions
Expand All @@ -1813,6 +1888,7 @@ public struct App: Codable, Identifiable {
self.appEvents = appEvents
self.reviewSubmissions = reviewSubmissions
self.subscriptionGracePeriod = subscriptionGracePeriod
self.appStoreVersionExperimentsV2 = appStoreVersionExperimentsV2
}

public init(from decoder: Decoder) throws {
Expand Down Expand Up @@ -1840,6 +1916,7 @@ public struct App: Codable, Identifiable {
self.appEvents = try values.decodeIfPresent(AppEvents.self, forKey: "appEvents")
self.reviewSubmissions = try values.decodeIfPresent(ReviewSubmissions.self, forKey: "reviewSubmissions")
self.subscriptionGracePeriod = try values.decodeIfPresent(SubscriptionGracePeriod.self, forKey: "subscriptionGracePeriod")
self.appStoreVersionExperimentsV2 = try values.decodeIfPresent(AppStoreVersionExperimentsV2.self, forKey: "appStoreVersionExperimentsV2")
}

public func encode(to encoder: Encoder) throws {
Expand Down Expand Up @@ -1867,6 +1944,7 @@ public struct App: Codable, Identifiable {
try values.encodeIfPresent(appEvents, forKey: "appEvents")
try values.encodeIfPresent(reviewSubmissions, forKey: "reviewSubmissions")
try values.encodeIfPresent(subscriptionGracePeriod, forKey: "subscriptionGracePeriod")
try values.encodeIfPresent(appStoreVersionExperimentsV2, forKey: "appStoreVersionExperimentsV2")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public struct AppEncryptionDeclaration: Codable, Identifiable {

public struct Relationships: Codable {
public var app: App?
/// - warning: Deprecated.
public var builds: Builds?
public var appEncryptionDeclarationDocument: AppEncryptionDeclarationDocument?

Expand Down Expand Up @@ -166,6 +167,7 @@ public struct AppEncryptionDeclaration: Codable, Identifiable {
}
}

@available(*, deprecated, message: "Deprecated")
public struct Builds: Codable {
public var links: Links?
public var meta: PagingInformation?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import Foundation

@available(*, deprecated, message: "Deprecated")
public struct AppEncryptionDeclarationBuildsLinkagesRequest: Codable {
public var data: [Datum]

Expand Down
12 changes: 8 additions & 4 deletions Sources/OpenAPI/Generated/Entities/AppResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct AppResponse: Codable {
case ciProduct(CiProduct)
case betaGroup(BetaGroup)
case appStoreVersion(AppStoreVersion)
case prereleaseVersion(PrereleaseVersion)
case preReleaseVersion(PreReleaseVersion)
case betaAppLocalization(BetaAppLocalization)
case build(Build)
case betaLicenseAgreement(BetaLicenseAgreement)
Expand All @@ -35,6 +35,7 @@ public struct AppResponse: Codable {
case appEvent(AppEvent)
case reviewSubmission(ReviewSubmission)
case subscriptionGracePeriod(SubscriptionGracePeriod)
case appStoreVersionExperimentV2(AppStoreVersionExperimentV2)

public init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
Expand All @@ -44,8 +45,8 @@ public struct AppResponse: Codable {
self = .betaGroup(value)
} else if let value = try? container.decode(AppStoreVersion.self) {
self = .appStoreVersion(value)
} else if let value = try? container.decode(PrereleaseVersion.self) {
self = .prereleaseVersion(value)
} else if let value = try? container.decode(PreReleaseVersion.self) {
self = .preReleaseVersion(value)
} else if let value = try? container.decode(BetaAppLocalization.self) {
self = .betaAppLocalization(value)
} else if let value = try? container.decode(Build.self) {
Expand Down Expand Up @@ -84,6 +85,8 @@ public struct AppResponse: Codable {
self = .reviewSubmission(value)
} else if let value = try? container.decode(SubscriptionGracePeriod.self) {
self = .subscriptionGracePeriod(value)
} else if let value = try? container.decode(AppStoreVersionExperimentV2.self) {
self = .appStoreVersionExperimentV2(value)
} else {
throw DecodingError.dataCorruptedError(in: container, debugDescription: "Failed to intialize `oneOf`")
}
Expand All @@ -95,7 +98,7 @@ public struct AppResponse: Codable {
case .ciProduct(let value): try container.encode(value)
case .betaGroup(let value): try container.encode(value)
case .appStoreVersion(let value): try container.encode(value)
case .prereleaseVersion(let value): try container.encode(value)
case .preReleaseVersion(let value): try container.encode(value)
case .betaAppLocalization(let value): try container.encode(value)
case .build(let value): try container.encode(value)
case .betaLicenseAgreement(let value): try container.encode(value)
Expand All @@ -115,6 +118,7 @@ public struct AppResponse: Codable {
case .appEvent(let value): try container.encode(value)
case .reviewSubmission(let value): try container.encode(value)
case .subscriptionGracePeriod(let value): try container.encode(value)
case .appStoreVersionExperimentV2(let value): try container.encode(value)
}
}
}
Expand Down
Loading

0 comments on commit 8c730a6

Please sign in to comment.