smbcloud_ascapi_mcp/requests.rs
1//! Tool parameter types.
2//!
3//! Every field carries a doc comment, because rustdoc comments become the
4//! JSON Schema `description` a model reads when deciding how to call a
5//! tool, and a parameter without one is a guess waiting to happen. The
6//! contract test in [`crate::server`] fails the build if any is missing.
7
8use serde::Deserialize;
9
10#[derive(Debug, Clone, Default, Deserialize, schemars::JsonSchema)]
11pub struct AppListRequest {
12 /// Only return the app with this bundle identifier, e.g.
13 /// xyz.smbcloud.mailx. Omit to list every app on the account.
14 #[serde(default)]
15 pub bundle_id: Option<String>,
16}
17
18#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
19pub struct AppIdRequest {
20 /// App Store Connect app id, the numeric string from the app's URL in
21 /// App Store Connect. Not the bundle identifier; use app_list to
22 /// translate one into the other.
23 pub app_id: String,
24}
25
26#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
27pub struct AppUpdateRequest {
28 /// App Store Connect app id.
29 pub app_id: String,
30 /// BCP-47 locale to make the app's primary language, e.g. en-US.
31 #[serde(default)]
32 pub primary_locale: Option<String>,
33 /// Content rights declaration, e.g. DOES_NOT_USE_THIRD_PARTY_CONTENT
34 /// or USES_THIRD_PARTY_CONTENT.
35 #[serde(default)]
36 pub content_rights_declaration: Option<String>,
37}
38
39#[derive(Debug, Clone, Default, Deserialize, schemars::JsonSchema)]
40pub struct BundleIdListRequest {
41 /// Only return the bundle ID matching this identifier exactly. Omit to
42 /// list every registered identifier.
43 #[serde(default)]
44 pub identifier: Option<String>,
45}
46
47#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
48pub struct BundleIdCreateRequest {
49 /// The reverse-DNS identifier to register, e.g. xyz.smbcloud.mailx.
50 pub identifier: String,
51 /// Human-readable name shown in the developer portal.
52 pub name: String,
53 /// Platform namespace: ios, mac_os, or universal. visionOS apps
54 /// register as ios, because visionOS shares the iOS namespace.
55 pub platform: String,
56}
57
58#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
59pub struct AppStoreVersionListRequest {
60 /// App Store Connect app id whose versions to list.
61 pub app_id: String,
62 /// Only return versions for this platform: ios, mac_os, tv_os, or
63 /// vision_os. Omit to list every platform's versions.
64 #[serde(default)]
65 pub platform: Option<String>,
66}
67
68#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
69pub struct BuildListRequest {
70 /// App Store Connect app id whose builds to list.
71 pub app_id: String,
72 /// Only return builds with this build number (CFBundleVersion), e.g.
73 /// 42. Not the marketing version; use pre_release_version for that.
74 #[serde(default)]
75 pub version: Option<String>,
76 /// Only return builds under this marketing version
77 /// (CFBundleShortVersionString), e.g. 1.1.0.
78 #[serde(default)]
79 pub pre_release_version: Option<String>,
80 /// Only return builds in this processing state: PROCESSING, FAILED,
81 /// INVALID, or VALID.
82 #[serde(default)]
83 pub processing_state: Option<String>,
84}
85
86#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
87pub struct IdRequest {
88 /// App Store Connect resource id.
89 pub id: String,
90}
91
92#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
93pub struct AppStoreVersionCreateRequest {
94 /// App Store Connect app id to add the version to.
95 pub app_id: String,
96 /// Platform for this version: ios, mac_os, tv_os, or vision_os. Adding
97 /// a platform to an existing app means creating a version for it here.
98 pub platform: String,
99 /// Marketing version string, e.g. 1.2.0.
100 pub version_string: String,
101 /// Copyright line, e.g. "2026 PT Sigit Mitra Bangun". Optional.
102 #[serde(default)]
103 pub copyright: Option<String>,
104}
105
106#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
107pub struct SetBuildRequest {
108 /// App Store Version id to attach the build to.
109 pub version_id: String,
110 /// Build id to attach. Use build_list to find one for the app.
111 pub build_id: String,
112}
113
114#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
115pub struct AppInfoLocalizationListRequest {
116 /// AppInfo id whose localizations to list. Use app_info_list to find
117 /// the AppInfo for an app.
118 pub app_info_id: String,
119}
120
121#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
122pub struct AppInfoLocalizationCreateRequest {
123 /// AppInfo id to add the localization to.
124 pub app_info_id: String,
125 /// BCP-47 locale, e.g. sv-SE or id-ID.
126 pub locale: String,
127 /// Localized app name shown on the product page.
128 pub name: String,
129 /// Localized subtitle, up to 30 characters.
130 #[serde(default)]
131 pub subtitle: Option<String>,
132 /// Localized privacy policy URL.
133 #[serde(default)]
134 pub privacy_policy_url: Option<String>,
135}
136
137#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
138pub struct AppInfoLocalizationUpdateRequest {
139 /// AppInfoLocalization id to update.
140 pub id: String,
141 /// New localized app name. Omit to leave unchanged.
142 #[serde(default)]
143 pub name: Option<String>,
144 /// New localized subtitle. Omit to leave unchanged.
145 #[serde(default)]
146 pub subtitle: Option<String>,
147 /// New privacy policy URL. Omit to leave unchanged.
148 #[serde(default)]
149 pub privacy_policy_url: Option<String>,
150}
151
152#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
153pub struct VersionLocalizationListRequest {
154 /// App Store Version id whose localizations to list.
155 pub version_id: String,
156}
157
158#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
159pub struct VersionLocalizationCreateRequest {
160 /// App Store Version id to add the localization to.
161 pub version_id: String,
162 /// BCP-47 locale, e.g. sv-SE or id-ID.
163 pub locale: String,
164 /// Long description shown on the product page, up to 4000 characters.
165 #[serde(default)]
166 pub description: Option<String>,
167 /// Comma-separated keyword field, up to 100 characters. Apple indexes
168 /// it for search and never shows it.
169 #[serde(default)]
170 pub keywords: Option<String>,
171 /// Marketing URL.
172 #[serde(default)]
173 pub marketing_url: Option<String>,
174 /// Promotional text, up to 170 characters. Editable without a new
175 /// build, unlike the description.
176 #[serde(default)]
177 pub promotional_text: Option<String>,
178 /// Support URL.
179 #[serde(default)]
180 pub support_url: Option<String>,
181 /// Release notes for this version.
182 #[serde(default)]
183 pub whats_new: Option<String>,
184}
185
186#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
187pub struct VersionLocalizationUpdateRequest {
188 /// AppStoreVersionLocalization id to update.
189 pub id: String,
190 /// New description. Omit to leave unchanged.
191 #[serde(default)]
192 pub description: Option<String>,
193 /// New keyword field. Omit to leave unchanged.
194 #[serde(default)]
195 pub keywords: Option<String>,
196 /// New marketing URL. Omit to leave unchanged.
197 #[serde(default)]
198 pub marketing_url: Option<String>,
199 /// New promotional text. Omit to leave unchanged.
200 #[serde(default)]
201 pub promotional_text: Option<String>,
202 /// New support URL. Omit to leave unchanged.
203 #[serde(default)]
204 pub support_url: Option<String>,
205 /// New release notes. Omit to leave unchanged.
206 #[serde(default)]
207 pub whats_new: Option<String>,
208}
209
210#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
211pub struct ScreenshotSetListRequest {
212 /// AppStoreVersionLocalization id whose screenshot sets to list.
213 pub localization_id: String,
214}
215
216#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
217pub struct ScreenshotSetCreateRequest {
218 /// AppStoreVersionLocalization id to create the set under.
219 pub localization_id: String,
220 /// Device class for this set, e.g. APP_IPHONE_67, APP_IPAD_PRO_129,
221 /// APP_APPLE_VISION_PRO, or APP_DESKTOP.
222 pub display_type: String,
223}
224
225#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
226pub struct ScreenshotListRequest {
227 /// AppScreenshotSet id whose screenshots to list.
228 pub screenshot_set_id: String,
229}
230
231#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
232pub struct ScreenshotUploadRequest {
233 /// AppScreenshotSet id to upload into.
234 pub screenshot_set_id: String,
235 /// Path to the image file on this machine. Read from disk by the
236 /// server, so it must be a path this process can open.
237 pub file_path: String,
238}
239
240#[derive(Debug, Clone, Default, Deserialize, schemars::JsonSchema)]
241pub struct CertificateListRequest {
242 /// Only list certificates of this type. One of development,
243 /// distribution, mac_app_distribution, mac_installer_distribution,
244 /// developer_id_application. Omit to list every type.
245 #[serde(default)]
246 pub certificate_type: Option<String>,
247}
248
249#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
250pub struct CertificateCreateRequest {
251 /// The kind of certificate to issue. One of development,
252 /// distribution, mac_app_distribution, mac_installer_distribution,
253 /// developer_id_application.
254 pub certificate_type: String,
255 /// Directory to write the private key and issued certificate into. It
256 /// is created if missing; the key is written with owner-only
257 /// permissions.
258 pub out_dir: String,
259 /// Subject common name for the signing request. Apple replaces the
260 /// subject on the certificate it issues, so this only labels the
261 /// request itself. Defaults to smbcloud-ascapi.
262 #[serde(default)]
263 pub common_name: Option<String>,
264}
265
266#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
267pub struct BetaGroupListRequest {
268 /// App Store Connect app id whose beta groups to list.
269 pub app_id: String,
270}
271
272#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
273pub struct BetaAppReviewDetailGetRequest {
274 /// App Store Connect app id whose beta app review contact detail to
275 /// retrieve.
276 pub app_id: String,
277}
278
279#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
280pub struct PlayPackageRequest {
281 /// Android application id, e.g. xyz.smbcloud.SiGit.
282 pub package_name: String,
283}
284
285#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
286pub struct PlayImagesListRequest {
287 /// Android application id, e.g. xyz.smbcloud.SiGit.
288 pub package_name: String,
289 /// Listing locale, e.g. en-US or id.
290 pub locale: String,
291 /// Image bucket: phone-screenshots, seven-inch-screenshots,
292 /// ten-inch-screenshots, feature-graphic or icon.
293 pub image_type: String,
294}
295
296#[derive(Debug, Clone, Deserialize, schemars::JsonSchema)]
297pub struct PlayTrackGetRequest {
298 /// Android application id, e.g. xyz.smbcloud.SiGit.
299 pub package_name: String,
300 /// Track name: internal, alpha, beta or production.
301 pub track: String,
302}