Skip to main content

smbcloud_ascapi_frontend/
lib.rs

1//! Operations shared by the `asc` command line and its MCP server.
2//!
3//! Both surfaces need the same things: resolve credentials, call the App
4//! Store Connect client, and shape the result into something worth showing
5//! a human or handing a model. Putting that here means the two front ends
6//! cannot drift, and in particular that the ordering guarantee in
7//! [`certificates::issue_certificate`] (private key written before the
8//! network call) has exactly one implementation.
9//!
10//! Two rules the result types are built around, because one of the
11//! consumers is a language model:
12//!
13//! - **No key material in a result.** [`certificates::IssuedCertificate`]
14//!   carries the path a key was written to, never the key. Enforced by
15//!   construction rather than filtered at the edge, since a filter is one
16//!   refactor away from being bypassed.
17//! - **No certificate bodies either.** They are large, never needed to
18//!   decide what to do next, and would otherwise land in a transcript.
19//!   [`profiles::ProfileSummary`] applies the same rule to
20//!   `profileContent`, and [`profiles::download_profile`] returns the path
21//!   it wrote instead.
22
23pub mod attach_build;
24pub mod await_processing;
25pub mod certificates;
26pub mod enums;
27pub mod env;
28#[cfg(target_os = "macos")]
29pub mod keychain;
30pub mod profiles;
31pub mod review;
32pub mod time;
33pub mod upload;
34
35pub use attach_build::{attach_build, AttachedBuild};
36pub use await_processing::{
37    await_processing, classify, AwaitConfig, AwaitOutcome, ProcessingClass,
38};
39pub use certificates::{
40    certificate_type_from_str, issue_certificate, CertificateSummary, IssuedCertificate,
41};
42pub use enums::{bundle_id_platform_from_str, display_type_from_str, platform_from_str};
43pub use env::api_key_from_env;
44#[cfg(target_os = "macos")]
45pub use keychain::{run_doctor, DoctorCertificate, DoctorReport};
46pub use profiles::{download_profile, profile_type_from_str, DownloadedProfile, ProfileSummary};
47pub use review::{plan_submission, submit_for_review, SubmissionPlan, SubmittedReview};
48pub use time::{is_expired, now_iso8601};
49pub use upload::{upload_package, AltoolAuth, UploadOutcome};