@smbcloud / smbcloud-ascapi Mirror · read-only
Fork 0

Read-only mirror of github.com/smbcloudXYZ/smbcloud-ascapi.

Mirrored from https://github.com/smbcloudXYZ/smbcloud-ascapi.git

Synced Nov 25, 09:15 UTC

1 # Architecture
2
3 Fourteen crates, split by domain and layered so neither front end can drift
4 from the other:
5
6 | Crate | What it is |
7 | --- | --- |
8 | `smbcloud-ascapi-core` | Shared transport: JWT auth, the HTTP client, JSON:API envelopes, error types |
9 | `smbcloud-ascapi-play` | Google Play (Edits v3): store listings, listing images, track release notes; service-account auth, independent of `core` |
10 | `smbcloud-ascapi-amazon` | Amazon Appstore App Submission API (Fire tablets, Fire TV): Login with Amazon client-credentials auth, the open edit, APK upload and replace (ETag), device targeting, validate; no commit, independent of `core` |
11 | `smbcloud-ascapi-appgallery` | Huawei AppGallery Connect Publishing API (Android): app info and listings, file and package upload, submit, phased release, release time, GMS flag, package list and status; Service Account auth (PS256 JWT), independent of `core` |
12 | `smbcloud-ascapi-msstore` | Microsoft Store submission API v1.0: listing text on an MSIX app's pending submission; Entra client-credentials auth, independent of `core` |
13 | `smbcloud-ascapi-xiaomi` | Xiaomi GetApps developer interface: HMAC-SHA1 signed requests, the order query and the APK upload address; independent of `core` |
14 | `smbcloud-ascapi-admob` | Google AdMob Management API (v1beta): apps and ad units; user OAuth (installed-app PKCE flow, cached refresh token), independent of `core` |
15 | `smbcloud-ascapi-aso` | App Metadata: apps, app infos, versions, builds, pre-release versions, review submissions, bundle IDs, localizations, screenshots |
16 | `smbcloud-ascapi-pricing` | Pricing: app price schedules, and the per-territory prices joined with their price points and currencies |
17 | `smbcloud-ascapi-iap` | In-app purchases (v2 `inAppPurchases`): one-time products, localizations, manual price schedules, territories, review screenshots and promotional images; subscriptions are out of scope |
18 | `smbcloud-ascapi-signing` | Code signing: certificates and provisioning profiles, plus local RSA key pair and CSR generation |
19 | `smbcloud-ascapi-reports` | Sales reports: account-level sales data, as Apple's gzip-compressed TSV |
20 | `smbcloud-ascapi-frontend` | Operations both surfaces share, so the CLI and the MCP server agree by construction, plus the CLI's `xcrun altool` upload |
21 | `smbcloud-ascapi-mcp` | The MCP contract and stdio server |
22 | `smbcloud-ascapi-cli` | The `asc` binary: clap command tree, plus `--mcp` |
23
24 `aso`, `play`, `appgallery`, `amazon`, `msstore`, `xiaomi`, `admob`, `pricing`,
25 `iap`, `signing` and `reports` know nothing about each other, and none of them knows
26 anything about the front ends.
27
28 `aso`, `pricing`, `iap`, `signing` and `reports` are the Apple-domain crates:
29 each adds its calls to `smbcloud_ascapi_core::Client` as **extension traits**,
30 since Rust only allows inherent impls in the crate that defines a type:
31
32 ```rust
33 use smbcloud_ascapi_core::{ApiKey, Client};
34 use smbcloud_ascapi_aso::prelude::*; // or pricing::prelude, signing::prelude
35 ```
36
37 The store backends `play`, `appgallery`, `amazon`, `msstore`, `xiaomi` and `admob` are
38 different: they authenticate their own way and have their own error envelopes,
39 so they do not depend on `core` and each defines its own client.