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 await_processing;
24pub mod certificates;
25pub mod enums;
26pub mod env;
27#[cfg(target_os = "macos")]
28pub mod keychain;
29pub mod profiles;
30pub mod review;
31pub mod time;
32pub mod upload;
33
34pub use await_processing::{
35 await_processing, classify, AwaitConfig, AwaitOutcome, ProcessingClass,
36};
37pub use certificates::{
38 certificate_type_from_str, issue_certificate, CertificateSummary, IssuedCertificate,
39};
40pub use enums::{bundle_id_platform_from_str, display_type_from_str, platform_from_str};
41pub use env::api_key_from_env;
42#[cfg(target_os = "macos")]
43pub use keychain::{run_doctor, DoctorCertificate, DoctorReport};
44pub use profiles::{download_profile, profile_type_from_str, DownloadedProfile, ProfileSummary};
45pub use review::{plan_submission, submit_for_review, SubmissionPlan, SubmittedReview};
46pub use time::{is_expired, now_iso8601};
47pub use upload::{upload_package, AltoolAuth, UploadOutcome};