fastlane 2.169.0 → 2.174.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +76 -76
- data/deliver/lib/deliver/app_screenshot.rb +5 -7
- data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
- data/deliver/lib/deliver/commands_generator.rb +1 -1
- data/deliver/lib/deliver/loader.rb +13 -29
- data/deliver/lib/deliver/setup.rb +8 -3
- data/deliver/lib/deliver/upload_metadata.rb +5 -3
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +12 -3
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -0
- data/fastlane/lib/fastlane/actions/appetize.rb +13 -1
- data/fastlane/lib/fastlane/actions/artifactory.rb +36 -3
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +10 -2
- data/fastlane/lib/fastlane/actions/build_app.rb +3 -1
- data/fastlane/lib/fastlane/actions/carthage.rb +22 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +15 -1
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +16 -1
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +118 -0
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +4 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +5 -1
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +0 -1
- data/fastlane/lib/fastlane/actions/git_commit.rb +6 -2
- data/fastlane/lib/fastlane/actions/github_api.rb +14 -3
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +1 -0
- data/fastlane/lib/fastlane/actions/onesignal.rb +13 -3
- data/fastlane/lib/fastlane/actions/pod_push.rb +9 -0
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +9 -1
- data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
- data/fastlane/lib/fastlane/actions/register_devices.rb +2 -1
- data/fastlane/lib/fastlane/actions/set_github_release.rb +21 -8
- data/fastlane/lib/fastlane/actions/slack.rb +4 -5
- data/fastlane/lib/fastlane/actions/spm.rb +2 -2
- data/fastlane/lib/fastlane/actions/swiftlint.rb +4 -4
- data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +291 -0
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +3 -0
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +2 -2
- data/fastlane/swift/Fastlane.swift +253 -37
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +11 -3
- data/fastlane/swift/LaneFileProtocol.swift +1 -1
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +2 -2
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +2 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +6 -2
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +2 -2
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +14 -2
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +15 -3
- data/fastlane/swift/SocketClient.swift +1 -1
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +18 -14
- data/fastlane/swift/main.swift +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +7 -1
- data/fastlane_core/lib/fastlane_core/helper.rb +2 -2
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +41 -16
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -4
- data/fastlane_core/lib/fastlane_core/project.rb +41 -14
- data/frameit/lib/frameit/device_types.rb +7 -1
- data/gym/lib/gym/error_handler.rb +8 -0
- data/gym/lib/gym/generators/build_command_generator.rb +3 -1
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +2 -2
- data/gym/lib/gym/options.rb +12 -2
- data/match/lib/match/encryption/openssl.rb +4 -2
- data/match/lib/match/runner.rb +1 -1
- data/match/lib/match/storage/git_storage.rb +14 -10
- data/precheck/lib/precheck/options.rb +6 -1
- data/precheck/lib/precheck/rule_processor.rb +1 -1
- data/precheck/lib/precheck/runner.rb +1 -1
- data/scan/lib/scan/options.rb +15 -0
- data/scan/lib/scan/runner.rb +6 -1
- data/scan/lib/scan/slack_poster.rb +4 -1
- data/scan/lib/scan/test_command_generator.rb +3 -1
- data/screengrab/lib/screengrab/runner.rb +2 -0
- data/sigh/lib/sigh/runner.rb +1 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +1 -1
- data/snapshot/lib/snapshot/options.rb +17 -2
- data/snapshot/lib/snapshot/update.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +14 -1
- data/spaceship/lib/spaceship/connect_api.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/api_client.rb +17 -2
- data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_category.rb +65 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_data_protection.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_grouping.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_purposes.rb +37 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usages_publish_state.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +9 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +26 -4
- data/spaceship/lib/spaceship/connect_api/models/device.rb +30 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +53 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +103 -0
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +1 -0
- data/spaceship/lib/spaceship/upgrade_2fa_later_client.rb +91 -0
- metadata +45 -25
- data/cert/lib/cert/.options.rb.swp +0 -0
- data/cert/lib/cert/.runner.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
- data/match/lib/match/.options.rb.swp +0 -0
- data/sigh/lib/sigh/.options.rb.swp +0 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppDataUsagePurpose
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :deleted
|
8
|
+
|
9
|
+
attr_mapping({
|
10
|
+
"deleted" => "deleted"
|
11
|
+
})
|
12
|
+
|
13
|
+
# Found at https://appstoreconnect.apple.com/iris/v1/appDataUsagePurposes
|
14
|
+
module ID
|
15
|
+
THIRD_PARTY_ADVERTISING = "THIRD_PARTY_ADVERTISING"
|
16
|
+
DEVELOPERS_ADVERTISING = "DEVELOPERS_ADVERTISING"
|
17
|
+
ANALYTICS = "ANALYTICS"
|
18
|
+
PRODUCT_PERSONALIZATION = "PRODUCT_PERSONALIZATION"
|
19
|
+
APP_FUNCTIONALITY = "APP_FUNCTIONALITY"
|
20
|
+
OTHER_PURPOSES = "OTHER_PURPOSES"
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.type
|
24
|
+
return "appDataUsagePurposes"
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# API
|
29
|
+
#
|
30
|
+
|
31
|
+
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
32
|
+
resps = Spaceship::ConnectAPI.get_app_data_usage_purposes(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
33
|
+
return resps.flat_map(&:to_models)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppDataUsagesPublishState
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :published
|
8
|
+
attr_accessor :last_published
|
9
|
+
attr_accessor :last_published_by
|
10
|
+
|
11
|
+
attr_mapping({
|
12
|
+
"published" => "published",
|
13
|
+
"lastPublished" => "last_published",
|
14
|
+
"lastPublishedBy" => "last_published_by"
|
15
|
+
})
|
16
|
+
|
17
|
+
def self.type
|
18
|
+
return "appDataUsagesPublishState"
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# API
|
23
|
+
#
|
24
|
+
|
25
|
+
def self.get(app_id: nil)
|
26
|
+
resp = Spaceship::ConnectAPI.get_app_data_usages_publish_state(app_id: app_id)
|
27
|
+
return resp.to_models.first
|
28
|
+
end
|
29
|
+
|
30
|
+
def publish!
|
31
|
+
resp = Spaceship::ConnectAPI.patch_app_data_usages_publish_state(app_data_usages_publish_state_id: id, published: true)
|
32
|
+
return resp.to_models.first
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -21,6 +21,9 @@ module Spaceship
|
|
21
21
|
attr_accessor :created_date
|
22
22
|
|
23
23
|
attr_accessor :app_store_version_submission
|
24
|
+
attr_accessor :app_store_version_phased_release
|
25
|
+
attr_accessor :app_store_review_detail
|
26
|
+
attr_accessor :app_store_version_localizations
|
24
27
|
|
25
28
|
module AppStoreState
|
26
29
|
READY_FOR_SALE = "READY_FOR_SALE"
|
@@ -58,7 +61,10 @@ module Spaceship
|
|
58
61
|
"createdDate" => "created_date",
|
59
62
|
|
60
63
|
"appStoreVersionSubmission" => "app_store_version_submission",
|
61
|
-
"build" => "build"
|
64
|
+
"build" => "build",
|
65
|
+
"appStoreVersionPhasedRelease" => "app_store_version_phased_release",
|
66
|
+
"appStoreReviewDetail" => "app_store_review_detail",
|
67
|
+
"appStoreVersionLocalizations" => "app_store_version_localizations"
|
62
68
|
})
|
63
69
|
|
64
70
|
ESSENTIAL_INCLUDES = [
|
@@ -38,6 +38,15 @@ module Spaceship
|
|
38
38
|
return client.post_bulk_beta_tester_assignments(beta_group_id: id, beta_testers: beta_testers)
|
39
39
|
end
|
40
40
|
|
41
|
+
def update(client: nil, attributes: nil)
|
42
|
+
return if attributes.empty?
|
43
|
+
|
44
|
+
client ||= Spaceship::ConnectAPI
|
45
|
+
|
46
|
+
attributes = reverse_attr_mapping(attributes)
|
47
|
+
return client.patch_group(group_id: id, attributes: attributes).first
|
48
|
+
end
|
49
|
+
|
41
50
|
def delete!
|
42
51
|
return Spaceship::ConnectAPI.delete_beta_group(group_id: id)
|
43
52
|
end
|
@@ -56,6 +56,30 @@ module Spaceship
|
|
56
56
|
client ||= Spaceship::ConnectAPI
|
57
57
|
return client.get_bundle_id(bundle_id_id: bundle_id_id, includes: includes).first
|
58
58
|
end
|
59
|
+
|
60
|
+
def self.create(client: nil, name: nil, platform: nil, identifier: nil, seed_id: nil)
|
61
|
+
client ||= Spaceship::ConnectAPI
|
62
|
+
resp = client.post_bundle_id(name: name, platform: platform, identifier: identifier, seed_id: seed_id)
|
63
|
+
return resp.to_models.first
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# BundleIdsCapabilities
|
68
|
+
#
|
69
|
+
|
70
|
+
def get_capabilities(client: nil, includes: nil)
|
71
|
+
client ||= Spaceship::ConnectAPI
|
72
|
+
resp = client.get_bundle_id_capabilities(bundle_id_id: id, includes: includes)
|
73
|
+
return resp.to_models
|
74
|
+
end
|
75
|
+
|
76
|
+
def create_capability(capability_type, settings: [], client: nil)
|
77
|
+
raise "capability_type is required " if capability_type.nil?
|
78
|
+
|
79
|
+
client ||= Spaceship::ConnectAPI
|
80
|
+
resp = client.post_bundle_id_capability(bundle_id_id: id, capability_type: capability_type, settings: settings)
|
81
|
+
return resp.to_models.first
|
82
|
+
end
|
59
83
|
end
|
60
84
|
end
|
61
85
|
end
|
@@ -41,6 +41,21 @@ module Spaceship
|
|
41
41
|
MARZIPAN = "MARZIPAN" # Catalyst
|
42
42
|
end
|
43
43
|
|
44
|
+
module Settings
|
45
|
+
ICLOUD_VERSION = "ICLOUD_VERSION"
|
46
|
+
DATA_PROTECTION_PERMISSION_LEVEL = "DATA_PROTECTION_PERMISSION_LEVEL"
|
47
|
+
APPLE_ID_AUTH_APP_CONSENT = "APPLE_ID_AUTH_APP_CONSENT"
|
48
|
+
end
|
49
|
+
|
50
|
+
module Options
|
51
|
+
XCODE_5 = "XCODE_5"
|
52
|
+
XCODE_6 = "XCODE_6"
|
53
|
+
COMPLETE_PROTECTION = "COMPLETE_PROTECTION"
|
54
|
+
PROTECTED_UNLESS_OPEN = "PROTECTED_UNLESS_OPEN"
|
55
|
+
PROTECTED_UNTIL_FIRST_USER_AUTH = "PROTECTED_UNTIL_FIRST_USER_AUTH"
|
56
|
+
PRIMARY_APP_CONSENT = "PRIMARY_APP_CONSENT"
|
57
|
+
end
|
58
|
+
|
44
59
|
def self.type
|
45
60
|
return "bundleIdCapabilities"
|
46
61
|
end
|
@@ -59,14 +74,21 @@ module Spaceship
|
|
59
74
|
# API
|
60
75
|
#
|
61
76
|
|
62
|
-
def self.all(client: nil,
|
77
|
+
def self.all(client: nil, bundle_id_id:, limit: nil)
|
78
|
+
client ||= Spaceship::ConnectAPI
|
79
|
+
resp = client.get_bundle_id_capabilities(bundle_id_id: bundle_id_id, limit: limit).all_pages
|
80
|
+
return resp.flat_map(&:to_models)
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.create(client: nil, bundle_id_id:, capability_type:, settings: [])
|
63
84
|
client ||= Spaceship::ConnectAPI
|
64
|
-
|
85
|
+
resp = client.post_bundle_id_capability(bundle_id_id: bundle_id_id, capability_type: capability_type, settings: settings)
|
86
|
+
return resp.to_models.first
|
65
87
|
end
|
66
88
|
|
67
|
-
def
|
89
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
68
90
|
client ||= Spaceship::ConnectAPI
|
69
|
-
|
91
|
+
client.delete_bundle_id_capability(bundle_id_capability_id: id)
|
70
92
|
end
|
71
93
|
end
|
72
94
|
end
|
@@ -40,6 +40,10 @@ module Spaceship
|
|
40
40
|
return "devices"
|
41
41
|
end
|
42
42
|
|
43
|
+
def enabled?
|
44
|
+
return status == Status::ENABLED
|
45
|
+
end
|
46
|
+
|
43
47
|
#
|
44
48
|
# API
|
45
49
|
#
|
@@ -50,6 +54,32 @@ module Spaceship
|
|
50
54
|
return resps.flat_map(&:to_models)
|
51
55
|
end
|
52
56
|
|
57
|
+
# @param client [ConnectAPI] ConnectAPI client.
|
58
|
+
# @param platform [String] The platform of the device.
|
59
|
+
# @param include_disabled [Bool] Whether to include disable devices. false by default.
|
60
|
+
# @return (Device) Find a device based on the UDID of the device. nil if no device was found.
|
61
|
+
def self.find_by_udid(device_udid, client: nil, platform: nil, include_disabled: false)
|
62
|
+
self.all(client: client).find do |device|
|
63
|
+
device.udid.casecmp(device_udid) == 0 && (include_disabled ? true : device.enabled?)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# @param client [ConnectAPI] ConnectAPI client.
|
68
|
+
# @param name [String] The name to be assigned to the device, if it needs to be created.
|
69
|
+
# @param platform [String] The platform of the device.
|
70
|
+
# @param include_disabled [Bool] Whether to include disable devices. false by default.
|
71
|
+
# @return (Device) Find a device based on the UDID of the device. If no device was found, nil if no device was found.
|
72
|
+
def self.find_or_create(device_udid, client: nil, name: nil, platform: nil, include_disabled: false)
|
73
|
+
existing = self.find_by_udid(device_udid, client: client, platform: platform)
|
74
|
+
return existing if existing
|
75
|
+
return self.create(client: client, name: name, platform: platform, udid: device_udid)
|
76
|
+
end
|
77
|
+
|
78
|
+
# @param client [ConnectAPI] ConnectAPI client.
|
79
|
+
# @param name [String] The name to be assigned to the device.
|
80
|
+
# @param platform [String] The platform of the device.
|
81
|
+
# @param udid [String] The udid of the device being created.
|
82
|
+
# @return (Device) Find a device based on the UDID of the device. nil if no device was found.
|
53
83
|
def self.create(client: nil, name: nil, platform: nil, udid: nil)
|
54
84
|
client ||= Spaceship::ConnectAPI
|
55
85
|
resp = client.post_device(name: name, platform: platform, udid: udid)
|
@@ -27,6 +27,59 @@ module Spaceship
|
|
27
27
|
provisioning_request_client.get("bundleIds/#{bundle_id_id}", params)
|
28
28
|
end
|
29
29
|
|
30
|
+
def post_bundle_id(name:, platform:, identifier:, seed_id:)
|
31
|
+
attributes = {
|
32
|
+
name: name,
|
33
|
+
platform: platform,
|
34
|
+
identifier: identifier,
|
35
|
+
seedId: seed_id
|
36
|
+
}
|
37
|
+
|
38
|
+
body = {
|
39
|
+
data: {
|
40
|
+
attributes: attributes,
|
41
|
+
type: "bundleIds"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
provisioning_request_client.post("bundleIds", body)
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# bundleIdCapability
|
50
|
+
#
|
51
|
+
|
52
|
+
def get_bundle_id_capabilities(bundle_id_id:, includes: nil, limit: nil, sort: nil)
|
53
|
+
params = provisioning_request_client.build_params(filter: nil, includes: includes, limit: limit, sort: sort)
|
54
|
+
provisioning_request_client.get("bundleIds/#{bundle_id_id}/bundleIdCapabilities", params)
|
55
|
+
end
|
56
|
+
|
57
|
+
def post_bundle_id_capability(bundle_id_id:, capability_type:, settings: [])
|
58
|
+
body = {
|
59
|
+
data: {
|
60
|
+
attributes: {
|
61
|
+
capabilityType: capability_type,
|
62
|
+
settings: settings
|
63
|
+
},
|
64
|
+
type: "bundleIdCapabilities",
|
65
|
+
relationships: {
|
66
|
+
bundleId: {
|
67
|
+
data: {
|
68
|
+
type: "bundleIds",
|
69
|
+
id: bundle_id_id
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
provisioning_request_client.post("bundleIdCapabilities", body)
|
77
|
+
end
|
78
|
+
|
79
|
+
def delete_bundle_id_capability(bundle_id_capability_id:)
|
80
|
+
provisioning_request_client.delete("bundleIdCapabilities/#{bundle_id_capability_id}")
|
81
|
+
end
|
82
|
+
|
30
83
|
#
|
31
84
|
# certificates
|
32
85
|
#
|
@@ -6,11 +6,13 @@ module Spaceship
|
|
6
6
|
include Enumerable
|
7
7
|
attr_reader :body
|
8
8
|
attr_reader :status
|
9
|
+
attr_reader :headers
|
9
10
|
attr_reader :client
|
10
11
|
|
11
|
-
def initialize(body: nil, status: nil, client: nil)
|
12
|
+
def initialize(body: nil, status: nil, headers: nil, client: nil)
|
12
13
|
@body = body
|
13
14
|
@status = status
|
15
|
+
@headers = headers
|
14
16
|
@client = client
|
15
17
|
end
|
16
18
|
|
@@ -214,6 +214,18 @@ module Spaceship
|
|
214
214
|
test_flight_request_client.post("betaGroups", body)
|
215
215
|
end
|
216
216
|
|
217
|
+
def patch_group(group_id: nil, attributes: {})
|
218
|
+
body = {
|
219
|
+
data: {
|
220
|
+
attributes: attributes,
|
221
|
+
id: group_id,
|
222
|
+
type: "betaGroups"
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
test_flight_request_client.patch("betaGroups/#{group_id}", body)
|
227
|
+
end
|
228
|
+
|
217
229
|
def delete_beta_group(group_id: nil)
|
218
230
|
raise "group_id is nil" if group_id.nil?
|
219
231
|
|
@@ -200,6 +200,109 @@ module Spaceship
|
|
200
200
|
tunes_request_client.patch("apps/#{app_id}", body)
|
201
201
|
end
|
202
202
|
|
203
|
+
#
|
204
|
+
# appDataUsage
|
205
|
+
#
|
206
|
+
|
207
|
+
def get_app_data_usages(app_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
208
|
+
params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
209
|
+
tunes_request_client.get("apps/#{app_id}/dataUsages", params)
|
210
|
+
end
|
211
|
+
|
212
|
+
def post_app_data_usage(app_id:, app_data_usage_category_id: nil, app_data_usage_protection_id: nil, app_data_usage_purpose_id: nil)
|
213
|
+
raise "app_id is required " if app_id.nil?
|
214
|
+
|
215
|
+
relationships = {
|
216
|
+
app: {
|
217
|
+
data: {
|
218
|
+
type: "apps",
|
219
|
+
id: app_id
|
220
|
+
}
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
224
|
+
if app_data_usage_category_id
|
225
|
+
relationships[:category] = {
|
226
|
+
data: {
|
227
|
+
type: "appDataUsageCategories",
|
228
|
+
id: app_data_usage_category_id
|
229
|
+
}
|
230
|
+
}
|
231
|
+
end
|
232
|
+
|
233
|
+
if app_data_usage_protection_id
|
234
|
+
relationships[:dataProtection] = {
|
235
|
+
data: {
|
236
|
+
type: "appDataUsageDataProtections",
|
237
|
+
id: app_data_usage_protection_id
|
238
|
+
}
|
239
|
+
}
|
240
|
+
end
|
241
|
+
|
242
|
+
if app_data_usage_purpose_id
|
243
|
+
relationships[:purpose] = {
|
244
|
+
data: {
|
245
|
+
type: "appDataUsagePurposes",
|
246
|
+
id: app_data_usage_purpose_id
|
247
|
+
}
|
248
|
+
}
|
249
|
+
end
|
250
|
+
|
251
|
+
body = {
|
252
|
+
data: {
|
253
|
+
type: "appDataUsages",
|
254
|
+
relationships: relationships
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
tunes_request_client.post("appDataUsages", body)
|
259
|
+
end
|
260
|
+
|
261
|
+
def delete_app_data_usage(app_data_usage_id: nil)
|
262
|
+
tunes_request_client.delete("appDataUsages/#{app_data_usage_id}")
|
263
|
+
end
|
264
|
+
|
265
|
+
#
|
266
|
+
# appDataUsageCategory
|
267
|
+
#
|
268
|
+
|
269
|
+
def get_app_data_usage_categories(filter: {}, includes: nil, limit: nil, sort: nil)
|
270
|
+
params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
271
|
+
tunes_request_client.get("appDataUsageCategories", params)
|
272
|
+
end
|
273
|
+
|
274
|
+
#
|
275
|
+
# appDataUsagePurpose
|
276
|
+
#
|
277
|
+
|
278
|
+
def get_app_data_usage_purposes(filter: {}, includes: nil, limit: nil, sort: nil)
|
279
|
+
params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
280
|
+
tunes_request_client.get("appDataUsagePurposes", params)
|
281
|
+
end
|
282
|
+
|
283
|
+
#
|
284
|
+
# appDataUsagesPublishState
|
285
|
+
#
|
286
|
+
|
287
|
+
def get_app_data_usages_publish_state(app_id: nil)
|
288
|
+
params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
289
|
+
tunes_request_client.get("apps/#{app_id}/dataUsagePublishState", params)
|
290
|
+
end
|
291
|
+
|
292
|
+
def patch_app_data_usages_publish_state(app_data_usages_publish_state_id: nil, published: nil)
|
293
|
+
body = {
|
294
|
+
data: {
|
295
|
+
type: "appDataUsagesPublishState",
|
296
|
+
id: app_data_usages_publish_state_id,
|
297
|
+
attributes: {
|
298
|
+
published: published
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
|
303
|
+
tunes_request_client.patch("appDataUsagesPublishState/#{app_data_usages_publish_state_id}", body)
|
304
|
+
end
|
305
|
+
|
203
306
|
#
|
204
307
|
# appPreview
|
205
308
|
#
|