Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spaceship] handle new app status #21890

Merged
merged 5 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions spaceship/lib/spaceship/connect_api/models/app_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class AppInfo
include Spaceship::ConnectAPI::Model

attr_accessor :app_store_state
attr_accessor :state
attr_accessor :app_store_age_rating
attr_accessor :brazil_age_rating
attr_accessor :kids_age_band
Expand All @@ -16,6 +17,7 @@ class AppInfo
attr_accessor :secondary_subcategory_one
attr_accessor :secondary_subcategory_two

# Deprecated in App Store Connect API specification 3.3
module AppStoreState
ACCEPTED = "ACCEPTED"
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
Expand All @@ -36,6 +38,20 @@ module AppStoreState
REPLACED_WITH_NEW_VERSION = "REPLACED_WITH_NEW_VERSION"
WAITING_FOR_EXPORT_COMPLIANCE = "WAITING_FOR_EXPORT_COMPLIANCE"
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
NOT_APPLICABLE = "NOT_APPLICABLE"
end

module State
ACCEPTED = "ACCEPTED"
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
IN_REVIEW = "IN_REVIEW"
PENDING_RELEASE = "PENDING_RELEASE"
PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
READY_FOR_DISTRIBUTION = "READY_FOR_DISTRIBUTION"
READY_FOR_REVIEW = "READY_FOR_REVIEW"
REJECTED = "REJECTED"
REPLACED_WITH_NEW_INFO = "REPLACED_WITH_NEW_INFO"
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
end

module AppStoreAgeRating
Expand All @@ -44,6 +60,7 @@ module AppStoreAgeRating

attr_mapping({
"appStoreState" => "app_store_state",
"state" => "state",
"appStoreAgeRating" => "app_store_age_rating",
"brazilAgeRating" => "brazil_age_rating",
"kidsAgeBand" => "kids_age_band",
Expand Down
53 changes: 44 additions & 9 deletions spaceship/lib/spaceship/connect_api/models/app_store_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class AppStoreVersion
attr_accessor :platform
attr_accessor :version_string
attr_accessor :app_store_state
attr_accessor :app_version_state
attr_accessor :store_icon
attr_accessor :watch_store_icon
attr_accessor :copyright
Expand All @@ -19,26 +20,53 @@ class AppStoreVersion
attr_accessor :is_watch_only
attr_accessor :downloadable
attr_accessor :created_date
attr_accessor :review_type

attr_accessor :app_store_version_submission
attr_accessor :app_store_version_phased_release
attr_accessor :app_store_review_detail
attr_accessor :app_store_version_localizations

# Deprecated in App Store Connect API specification 3.3
module AppStoreState
READY_FOR_SALE = "READY_FOR_SALE"
READY_FOR_REVIEW = "READY_FOR_REVIEW"
PROCESSING_FOR_APP_STORE = "PROCESSING_FOR_APP_STORE"
PENDING_DEVELOPER_RELEASE = "PENDING_DEVELOPER_RELEASE"
PENDING_APPLE_RELEASE = "PENDING_APPLE_RELEASE"
IN_REVIEW = "IN_REVIEW"
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
ACCEPTED = "ACCEPTED"
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
DEVELOPER_REMOVED_FROM_SALE = "DEVELOPER_REMOVED_FROM_SALE"
REJECTED = "REJECTED"
PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
IN_REVIEW = "IN_REVIEW"
INVALID_BINARY = "INVALID_BINARY"
METADATA_REJECTED = "METADATA_REJECTED"
PENDING_APPLE_RELEASE = "PENDING_APPLE_RELEASE"
PENDING_CONTRACT = "PENDING_CONTRACT"
PENDING_DEVELOPER_RELEASE = "PENDING_DEVELOPER_RELEASE"
PREORDER_READY_FOR_SALE = "PREORDER_READY_FOR_SALE"
PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
PROCESSING_FOR_APP_STORE = "PROCESSING_FOR_APP_STORE"
READY_FOR_REVIEW = "READY_FOR_REVIEW"
READY_FOR_SALE = "READY_FOR_SALE"
REJECTED = "REJECTED"
REMOVED_FROM_SALE = "REMOVED_FROM_SALE"
REPLACED_WITH_NEW_VERSION = "REPLACED_WITH_NEW_VERSION"
WAITING_FOR_EXPORT_COMPLIANCE = "WAITING_FOR_EXPORT_COMPLIANCE"
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
NOT_APPLICABLE = "NOT_APPLICABLE"
end

module AppVersionState
ACCEPTED = "ACCEPTED"
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
IN_REVIEW = "IN_REVIEW"
INVALID_BINARY = "INVALID_BINARY"
METADATA_REJECTED = "METADATA_REJECTED"
PENDING_APPLE_RELEASE = "PENDING_APPLE_RELEASE"
PENDING_DEVELOPER_RELEASE = "PENDING_DEVELOPER_RELEASE"
PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
PROCESSING_FOR_DISTRIBUTION = "PROCESSING_FOR_DISTRIBUTION"
READY_FOR_DISTRIBUTION = "READY_FOR_DISTRIBUTION"
READY_FOR_REVIEW = "READY_FOR_REVIEW"
REJECTED = "REJECTED"
REPLACED_WITH_NEW_VERSION = "REPLACED_WITH_NEW_VERSION"
WAITING_FOR_EXPORT_COMPLIANCE = "WAITING_FOR_EXPORT_COMPLIANCE"
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
end

module ReleaseType
Expand All @@ -47,10 +75,16 @@ module ReleaseType
SCHEDULED = "SCHEDULED"
end

module ReviewType
APP_STORE = "APP_STORE"
NOTARIZATION = "NOTARIZATION"
end

attr_mapping({
"platform" => "platform",
"versionString" => "version_string",
"appStoreState" => "app_store_state",
"appVersionState" => "app_version_state",
"storeIcon" => "store_icon",
"watchStoreIcon" => "watch_store_icon",
"copyright" => "copyright",
Expand All @@ -60,6 +94,7 @@ module ReleaseType
"isWatchOnly" => "is_watch_only",
"downloadable" => "downloadable",
"createdDate" => "created_date",
"reviewType" => "review_type",

"appStoreVersionSubmission" => "app_store_version_submission",
"build" => "build",
Expand Down