Overhauled the library with several new features (#5)
## Summary Updates the library to v4.5.1 of the App Store Connect API, and ships it as a breaking 2.0.0 release with pagination, API key authentication, rate limiting, and a lighter install for consumers. ## Breaking changes - **Minimum platforms:** iOS 14, macOS 11, tvOS 14, watchOS 7, and visionOS 1. - **Toolchain:** Swift 6.0+ (Xcode 16+). The package builds in the Swift 6 language mode. - **Runtime:** requires `swift-openapi-runtime` 1.11.0 or later. ## Changes - **API:** updated the OpenAPI specification to v4.5.1, covering 1,303 operations and 1,473 schemas. - **Pagination:** the spec patch adds the undocumented `cursor` query parameter to the 465 paged operations. `PagedDocumentLinks.nextCursor` reads the cursor from a page, and `PagedSequence` iterates every page. - **Authentication:** `APIKeyTokenProvider` signs ES256 tokens from an API key and reuses each one until a minute before it expires. `BearerAuthMiddleware` now accepts a token provider. - **Rate limiting:** `RateLimitMiddleware` retries `429` responses, waiting for `Retry-After` or backing off exponentially. - **Generated code:** committed to `Sources/ASConnectService/Sources/Public/Generated` instead of generated by a build plugin. Consumers now resolve 4 packages instead of 12, and Xcode no longer asks to trust a plugin. - **Tooling:** - `make oas-download` now downloads, patches, generates, and checks the docs in one go. - New `make oas-generate`, `make oas-validate`, and `make doc-check` targets. - The generator is pinned in `Tools/`, and the DocC plugin is only resolved by the documentation targets. - **Documentation:** the DocC catalog now lists every operation and schema in the spec, and the catalog and README are rewritten for the new APIs. - **Housekeeping:** Apache 2.0 license headers on every Swift file, including `Package.swift` and the tests. Reviewed-on: #5 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #5.
This commit is contained in:
1 parent
3aaf5cd7a5
commit
0431fb5133
27 files changed
+1046471
-284
No files matched your search
@@ -1,18 +1,14 @@
|
||||
# ``Operations``
|
||||
|
||||
API operations, with input and output types, generated from the paths section of the OpenAPI document.
|
||||
The request and response types of each API operation.
|
||||
|
||||
## Overview
|
||||
|
||||
The ``Operations`` namespace contains a nested enum for each API operation defined in the App Store Connect API OpenAPI specification. Each operation enum encapsulates the `Input` and `Output` types for that specific endpoint.
|
||||
Each operation is an enum, named after its ``APIProtocol`` method, that contains:
|
||||
|
||||
Each operation typically provides:
|
||||
|
||||
- An **`Input`** struct containing the request `Path`, `Query`, `Headers`, and `Body` types
|
||||
- An **`Output`** enum with cases for each possible HTTP response status code
|
||||
- An **`id`** string constant with the operation identifier
|
||||
|
||||
These types are used by the ``APIProtocol`` methods and the ``Client`` implementation.
|
||||
- `Input`: The request, split into `path`, `query`, `headers`, and `body` as the endpoint requires.
|
||||
- `Output`: The response, with a case for each documented status, such as `ok`, and `undocumented(statusCode:_:)` for any other.
|
||||
- `id`: The operation identifier in the OpenAPI document, such as `apps_getCollection`.
|
||||
|
||||
## Topics
|
||||
|
||||
@@ -104,6 +100,9 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/AppsSubscriptionGracePeriodGetToOneRelated``
|
||||
- ``Operations/AppsSubscriptionGroupsGetToManyRelated``
|
||||
- ``Operations/AppsWebhooksGetToManyRelated``
|
||||
- ``Operations/AppsAssetLibraryGetToOneRelationship``
|
||||
- ``Operations/AppsAssetLibraryGetToOneRelated``
|
||||
- ``Operations/AppsPerformanceOverviewsGetToManyRelated``
|
||||
- ``Operations/AppInfosGetInstance``
|
||||
- ``Operations/AppInfosUpdateInstance``
|
||||
- ``Operations/AppInfosAgeRatingDeclarationGetToOneRelated``
|
||||
@@ -205,6 +204,8 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/AppStoreVersionLocalizationsSearchKeywordsCreateToManyRelationship``
|
||||
- ``Operations/AppStoreVersionLocalizationsSearchKeywordsDeleteToManyRelationship``
|
||||
- ``Operations/AppStoreVersionLocalizationsSearchKeywordsGetToManyRelated``
|
||||
- ``Operations/AppStoreVersionLocalizationsPlacementsGetToManyRelationship``
|
||||
- ``Operations/AppStoreVersionLocalizationsPlacementsGetToManyRelated``
|
||||
- ``Operations/AppStoreVersionPhasedReleasesCreateInstance``
|
||||
- ``Operations/AppStoreVersionPhasedReleasesUpdateInstance``
|
||||
- ``Operations/AppStoreVersionPhasedReleasesDeleteInstance``
|
||||
@@ -239,6 +240,8 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/AppStoreVersionExperimentTreatmentLocalizationsAppScreenshotSetsGetToManyRelated``
|
||||
- ``Operations/AppStoreVersionExperimentTreatmentLocalizationsAppPreviewSetsGetToManyRelationship``
|
||||
- ``Operations/AppStoreVersionExperimentTreatmentLocalizationsAppScreenshotSetsGetToManyRelationship``
|
||||
- ``Operations/AppStoreVersionExperimentTreatmentLocalizationsPlacementsGetToManyRelationship``
|
||||
- ``Operations/AppStoreVersionExperimentTreatmentLocalizationsPlacementsGetToManyRelated``
|
||||
|
||||
### App Custom Product Pages
|
||||
|
||||
@@ -265,6 +268,8 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/AppCustomProductPageLocalizationsSearchKeywordsCreateToManyRelationship``
|
||||
- ``Operations/AppCustomProductPageLocalizationsSearchKeywordsDeleteToManyRelationship``
|
||||
- ``Operations/AppCustomProductPageLocalizationsSearchKeywordsGetToManyRelated``
|
||||
- ``Operations/AppCustomProductPageLocalizationsPlacementsGetToManyRelationship``
|
||||
- ``Operations/AppCustomProductPageLocalizationsPlacementsGetToManyRelated``
|
||||
|
||||
### App Clips
|
||||
|
||||
@@ -320,6 +325,8 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/AppEventLocalizationsAppEventVideoClipsGetToManyRelated``
|
||||
- ``Operations/AppEventLocalizationsAppEventScreenshotsGetToManyRelationship``
|
||||
- ``Operations/AppEventLocalizationsAppEventVideoClipsGetToManyRelationship``
|
||||
- ``Operations/AppEventLocalizationsPlacementsGetToManyRelationship``
|
||||
- ``Operations/AppEventLocalizationsPlacementsGetToManyRelated``
|
||||
- ``Operations/AppEventScreenshotsCreateInstance``
|
||||
- ``Operations/AppEventScreenshotsGetInstance``
|
||||
- ``Operations/AppEventScreenshotsUpdateInstance``
|
||||
@@ -356,6 +363,32 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/RoutingAppCoveragesUpdateInstance``
|
||||
- ``Operations/RoutingAppCoveragesDeleteInstance``
|
||||
|
||||
### App Asset Library
|
||||
|
||||
- ``Operations/AppAssetLibrariesGetInstance``
|
||||
- ``Operations/AppAssetLibrariesImagesGetToManyRelationship``
|
||||
- ``Operations/AppAssetLibrariesImagesGetToManyRelated``
|
||||
- ``Operations/AppAssetLibrariesVideosGetToManyRelationship``
|
||||
- ``Operations/AppAssetLibrariesVideosGetToManyRelated``
|
||||
- ``Operations/AppAssetLibraryImagesCreateInstance``
|
||||
- ``Operations/AppAssetLibraryImagesGetInstance``
|
||||
- ``Operations/AppAssetLibraryImagesUpdateInstance``
|
||||
- ``Operations/AppAssetLibraryImagesDeleteInstance``
|
||||
- ``Operations/AppAssetLibraryImagesPlacementsGetToManyRelationship``
|
||||
- ``Operations/AppAssetLibraryImagesPlacementsGetToManyRelated``
|
||||
- ``Operations/AppAssetLibraryVideosCreateInstance``
|
||||
- ``Operations/AppAssetLibraryVideosGetInstance``
|
||||
- ``Operations/AppAssetLibraryVideosUpdateInstance``
|
||||
- ``Operations/AppAssetLibraryVideosDeleteInstance``
|
||||
- ``Operations/AppAssetLibraryVideosPlacementsGetToManyRelationship``
|
||||
- ``Operations/AppAssetLibraryVideosPlacementsGetToManyRelated``
|
||||
- ``Operations/AppAssetLibraryPlacementsCreateInstance``
|
||||
- ``Operations/AppAssetLibraryPlacementsGetInstance``
|
||||
- ``Operations/AppAssetLibraryPlacementsDeleteInstance``
|
||||
- ``Operations/AppAssetLibraryPlacementOrderingRequestsCreateInstance``
|
||||
- ``Operations/AppAssetLibraryRefDataGetCollection``
|
||||
- ``Operations/AppAssetLibraryRefDataGetInstance``
|
||||
|
||||
### App Encryption
|
||||
|
||||
- ``Operations/AppEncryptionDeclarationsGetCollection``
|
||||
@@ -579,15 +612,33 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/InAppPurchasesV2OfferCodesGetToManyRelationship``
|
||||
- ``Operations/InAppPurchasesV2PricePointsGetToManyRelationship``
|
||||
- ``Operations/InAppPurchasesV2PromotedPurchaseGetToOneRelationship``
|
||||
- ``Operations/InAppPurchasesV2VersionsGetToManyRelationship``
|
||||
- ``Operations/InAppPurchasesV2VersionsGetToManyRelated``
|
||||
- ``Operations/InAppPurchaseVersionsCreateInstance``
|
||||
- ``Operations/InAppPurchaseVersionsGetInstance``
|
||||
- ``Operations/InAppPurchaseVersionsImageGetToOneRelationship``
|
||||
- ``Operations/InAppPurchaseVersionsImageGetToOneRelated``
|
||||
- ``Operations/InAppPurchaseVersionsImagesGetToManyRelationship``
|
||||
- ``Operations/InAppPurchaseVersionsImagesGetToManyRelated``
|
||||
- ``Operations/InAppPurchaseVersionsLocalizationsGetToManyRelationship``
|
||||
- ``Operations/InAppPurchaseVersionsLocalizationsGetToManyRelated``
|
||||
- ``Operations/InAppPurchaseLocalizationsCreateInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsGetInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsUpdateInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsDeleteInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsV2CreateInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsV2GetInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsV2UpdateInstance``
|
||||
- ``Operations/InAppPurchaseLocalizationsV2DeleteInstance``
|
||||
- ``Operations/InAppPurchaseContentsGetInstance``
|
||||
- ``Operations/InAppPurchaseImagesCreateInstance``
|
||||
- ``Operations/InAppPurchaseImagesGetInstance``
|
||||
- ``Operations/InAppPurchaseImagesUpdateInstance``
|
||||
- ``Operations/InAppPurchaseImagesDeleteInstance``
|
||||
- ``Operations/InAppPurchaseImagesV2CreateInstance``
|
||||
- ``Operations/InAppPurchaseImagesV2GetInstance``
|
||||
- ``Operations/InAppPurchaseImagesV2UpdateInstance``
|
||||
- ``Operations/InAppPurchaseImagesV2DeleteInstance``
|
||||
- ``Operations/InAppPurchaseAppStoreReviewScreenshotsCreateInstance``
|
||||
- ``Operations/InAppPurchaseAppStoreReviewScreenshotsGetInstance``
|
||||
- ``Operations/InAppPurchaseAppStoreReviewScreenshotsUpdateInstance``
|
||||
@@ -658,6 +709,18 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/SubscriptionsSubscriptionAvailabilityGetToOneRelated``
|
||||
- ``Operations/SubscriptionsSubscriptionLocalizationsGetToManyRelated``
|
||||
- ``Operations/SubscriptionsWinBackOffersGetToManyRelated``
|
||||
- ``Operations/SubscriptionsPlanAvailabilitiesGetToManyRelationship``
|
||||
- ``Operations/SubscriptionsPlanAvailabilitiesGetToManyRelated``
|
||||
- ``Operations/SubscriptionsVersionsGetToManyRelationship``
|
||||
- ``Operations/SubscriptionsVersionsGetToManyRelated``
|
||||
- ``Operations/SubscriptionVersionsCreateInstance``
|
||||
- ``Operations/SubscriptionVersionsGetInstance``
|
||||
- ``Operations/SubscriptionVersionsImageGetToOneRelationship``
|
||||
- ``Operations/SubscriptionVersionsImageGetToOneRelated``
|
||||
- ``Operations/SubscriptionVersionsImagesGetToManyRelationship``
|
||||
- ``Operations/SubscriptionVersionsImagesGetToManyRelated``
|
||||
- ``Operations/SubscriptionVersionsLocalizationsGetToManyRelationship``
|
||||
- ``Operations/SubscriptionVersionsLocalizationsGetToManyRelated``
|
||||
- ``Operations/SubscriptionGroupsCreateInstance``
|
||||
- ``Operations/SubscriptionGroupsGetInstance``
|
||||
- ``Operations/SubscriptionGroupsUpdateInstance``
|
||||
@@ -666,19 +729,37 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/SubscriptionGroupsSubscriptionsGetToManyRelationship``
|
||||
- ``Operations/SubscriptionGroupsSubscriptionGroupLocalizationsGetToManyRelated``
|
||||
- ``Operations/SubscriptionGroupsSubscriptionsGetToManyRelated``
|
||||
- ``Operations/SubscriptionGroupsVersionsGetToManyRelationship``
|
||||
- ``Operations/SubscriptionGroupsVersionsGetToManyRelated``
|
||||
- ``Operations/SubscriptionGroupVersionsCreateInstance``
|
||||
- ``Operations/SubscriptionGroupVersionsGetInstance``
|
||||
- ``Operations/SubscriptionGroupVersionsLocalizationsGetToManyRelationship``
|
||||
- ``Operations/SubscriptionGroupVersionsLocalizationsGetToManyRelated``
|
||||
- ``Operations/SubscriptionGroupLocalizationsCreateInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsGetInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsUpdateInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsDeleteInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsV2CreateInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsV2GetInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsV2UpdateInstance``
|
||||
- ``Operations/SubscriptionGroupLocalizationsV2DeleteInstance``
|
||||
- ``Operations/SubscriptionGroupSubmissionsCreateInstance``
|
||||
- ``Operations/SubscriptionLocalizationsCreateInstance``
|
||||
- ``Operations/SubscriptionLocalizationsGetInstance``
|
||||
- ``Operations/SubscriptionLocalizationsUpdateInstance``
|
||||
- ``Operations/SubscriptionLocalizationsDeleteInstance``
|
||||
- ``Operations/SubscriptionLocalizationsV2CreateInstance``
|
||||
- ``Operations/SubscriptionLocalizationsV2GetInstance``
|
||||
- ``Operations/SubscriptionLocalizationsV2UpdateInstance``
|
||||
- ``Operations/SubscriptionLocalizationsV2DeleteInstance``
|
||||
- ``Operations/SubscriptionImagesCreateInstance``
|
||||
- ``Operations/SubscriptionImagesGetInstance``
|
||||
- ``Operations/SubscriptionImagesUpdateInstance``
|
||||
- ``Operations/SubscriptionImagesDeleteInstance``
|
||||
- ``Operations/SubscriptionImagesV2CreateInstance``
|
||||
- ``Operations/SubscriptionImagesV2GetInstance``
|
||||
- ``Operations/SubscriptionImagesV2UpdateInstance``
|
||||
- ``Operations/SubscriptionImagesV2DeleteInstance``
|
||||
- ``Operations/SubscriptionAppStoreReviewScreenshotsCreateInstance``
|
||||
- ``Operations/SubscriptionAppStoreReviewScreenshotsGetInstance``
|
||||
- ``Operations/SubscriptionAppStoreReviewScreenshotsUpdateInstance``
|
||||
@@ -687,6 +768,12 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/SubscriptionAvailabilitiesGetInstance``
|
||||
- ``Operations/SubscriptionAvailabilitiesAvailableTerritoriesGetToManyRelated``
|
||||
- ``Operations/SubscriptionAvailabilitiesAvailableTerritoriesGetToManyRelationship``
|
||||
- ``Operations/SubscriptionPlanAvailabilitiesCreateInstance``
|
||||
- ``Operations/SubscriptionPlanAvailabilitiesGetInstance``
|
||||
- ``Operations/SubscriptionPlanAvailabilitiesUpdateInstance``
|
||||
- ``Operations/SubscriptionPlanAvailabilitiesAvailableTerritoriesGetToManyRelationship``
|
||||
- ``Operations/SubscriptionPlanAvailabilitiesAvailableTerritoriesReplaceToManyRelationship``
|
||||
- ``Operations/SubscriptionPlanAvailabilitiesAvailableTerritoriesGetToManyRelated``
|
||||
- ``Operations/SubscriptionGracePeriodsGetInstance``
|
||||
- ``Operations/SubscriptionGracePeriodsUpdateInstance``
|
||||
- ``Operations/SubscriptionIntroductoryOffersCreateInstance``
|
||||
@@ -711,6 +798,7 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/SubscriptionPricePointsGetInstance``
|
||||
- ``Operations/SubscriptionPricePointsEqualizationsGetToManyRelated``
|
||||
- ``Operations/SubscriptionPricePointsEqualizationsGetToManyRelationship``
|
||||
- ``Operations/SubscriptionPricePointsAdjustedEqualizationsGetToManyRelated``
|
||||
- ``Operations/SubscriptionPricesCreateInstance``
|
||||
- ``Operations/SubscriptionPricesDeleteInstance``
|
||||
- ``Operations/SubscriptionPromotionalOffersCreateInstance``
|
||||
@@ -771,6 +859,9 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/GameCenterDetailsGameCenterLeaderboardsV2ReplaceToManyRelationship``
|
||||
- ``Operations/GameCenterDetailsLeaderboardReleasesGetToManyRelationship``
|
||||
- ``Operations/GameCenterDetailsLeaderboardSetReleasesGetToManyRelationship``
|
||||
- ``Operations/GameCenterDetailsBlockedPlayersGetToManyRelationship``
|
||||
- ``Operations/GameCenterDetailsBlockedPlayersGetToManyRelated``
|
||||
- ``Operations/GameCenterDetailPlayersUpdateInstance``
|
||||
- ``Operations/GameCenterGroupsGetCollection``
|
||||
- ``Operations/GameCenterGroupsCreateInstance``
|
||||
- ``Operations/GameCenterGroupsGetInstance``
|
||||
@@ -869,6 +960,9 @@ These types are used by the ``APIProtocol`` methods and the ``Client`` implement
|
||||
- ``Operations/GameCenterLeaderboardsV2ChallengeUpdateToOneRelationship``
|
||||
- ``Operations/GameCenterLeaderboardsV2VersionsGetToManyRelationship``
|
||||
- ``Operations/GameCenterLeaderboardsV2VersionsGetToManyRelated``
|
||||
- ``Operations/GameCenterLeaderboardsV2GameCenterScoreModerationsGetToManyRelationship``
|
||||
- ``Operations/GameCenterLeaderboardsV2GameCenterScoreModerationsGetToManyRelated``
|
||||
- ``Operations/GameCenterScoreModerationsUpdateInstance``
|
||||
- ``Operations/GameCenterLeaderboardVersionsV2CreateInstance``
|
||||
- ``Operations/GameCenterLeaderboardVersionsV2GetInstance``
|
||||
- ``Operations/GameCenterLeaderboardVersionsV2LocalizationsGetToManyRelated``
|
||||
|
||||
Reference in new issue
Block a user