diff --git a/.github/workflows/release-crates.yml b/.github/workflows/release-crates.yml new file mode 100644 index 0000000..44c6d48 --- /dev/null +++ b/.github/workflows/release-crates.yml @@ -0,0 +1,200 @@ +name: Release crates.io + +# This is the only workflow that reacts to a tag push. It verifies the tag, +# publishes every workspace crate to crates.io in dependency order, and then +# dispatches the GitHub release and the MCP Registry release with the same +# tag. Neither runs for a crate release that failed: the MCP Registry reads +# the published crate, so it has to exist first. + +on: + push: + tags: + - "v*.*.*" + workflow_dispatch: + inputs: + tag: + description: "Release tag (e.g. v0.2.0)" + required: true + +permissions: + contents: read + actions: write + +concurrency: + group: release-crates-${{ github.ref }} + cancel-in-progress: false + +env: + CARGO_TERM_COLOR: always + +jobs: + verify: + name: Verify release + runs-on: ubuntu-latest + outputs: + version: ${{ steps.release.outputs.version }} + tag: ${{ steps.release.outputs.tag }} + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + ref: ${{ github.event.inputs.tag || github.ref }} + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 + with: + toolchain: stable + components: clippy, rustfmt + + - name: Cache cargo registry and build artifacts + uses: Swatinem/rust-cache@v2 + + - name: Set the release version + id: release + shell: bash + run: | + if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then + release_tag="${GITHUB_REF_NAME}" + else + release_tag="${{ github.event.inputs.tag }}" + release_tag="${release_tag#refs/tags/}" + fi + release_version="${release_tag#v}" + + echo "tag=${release_tag}" >> "$GITHUB_OUTPUT" + echo "version=${release_version}" >> "$GITHUB_OUTPUT" + + - name: Ensure tag matches the workspace version + shell: bash + run: | + version="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n 1)" + if [ -z "$version" ]; then + echo "::error::Failed to read the workspace version from Cargo.toml" + exit 1 + fi + if [ "$version" != "${{ steps.release.outputs.version }}" ]; then + echo "::error::Cargo.toml is ${version} but the tag is ${{ steps.release.outputs.version }}" + exit 1 + fi + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --workspace --all-targets --locked -- -D warnings + + - name: Run tests + run: cargo test --workspace --locked + + # Each lower crate has to build alone: a crate that only compiles + # because a sibling's features leak in through the workspace would fail + # for every consumer of the published crate. + - name: Check the lower crates build alone + shell: bash + run: | + for crate in core aso pricing signing reports; do + cargo check -p "smbcloud-ascapi-${crate}" --locked + done + + publish: + name: Publish to crates.io + runs-on: ubuntu-latest + needs: verify + environment: + name: crates-io + # OIDC is how we authenticate to crates.io (trusted publishing): each + # crate trusts a GitHub Actions token issued for this repository and + # workflow, so no long-lived registry token is stored. + permissions: + contents: read + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + ref: ${{ github.event.inputs.tag || github.ref }} + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 + with: + toolchain: stable + + - name: Cache cargo registry and build artifacts + uses: Swatinem/rust-cache@v2 + + - name: Authenticate to crates.io + id: auth + uses: rust-lang/crates-io-auth-action@v1 + + - name: Publish crates + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} + shell: bash + run: | + version="${{ needs.verify.outputs.version }}" + + # Dependency order: a crate can only be published once everything it + # depends on is on crates.io. core first, then the domain crates + # that only depend on core, then frontend, mcp, and the CLI last. + crates=( + core + aso + pricing + signing + reports + frontend + mcp + cli + ) + + for crate in "${crates[@]}"; do + name="smbcloud-ascapi-${crate}" + + # Skipping versions that are already up makes a re-run after a + # partial failure pick up where it stopped: crates.io versions + # are immutable, so a second publish would only error. + if curl -sSf -H "User-Agent: smbcloudXYZ/smbcloud-ascapi release-workflow" \ + "https://crates.io/api/v1/crates/${name}/${version}" >/dev/null 2>&1; then + echo "${name} ${version} is already on crates.io, skipping" + continue + fi + + echo "Publishing ${name} ${version}" + # cargo waits for the crate to show up in the index before it + # returns, so the next crate can resolve this one. + cargo publish -p "${name}" --locked + done + + dispatch-distributions: + name: Trigger distribution workflows + needs: [verify, publish] + runs-on: ubuntu-latest + + steps: + - name: Trigger GitHub release + uses: actions/github-script@v7 + with: + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'release-github.yml', + ref: '${{ needs.verify.outputs.tag }}', + inputs: { + tag: '${{ needs.verify.outputs.tag }}' + } + }) + + - name: Trigger MCP Registry release + uses: actions/github-script@v7 + with: + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'release-mcp-registry.yml', + ref: '${{ needs.verify.outputs.tag }}', + inputs: { + tag: '${{ needs.verify.outputs.tag }}' + } + }) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..036b85c --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 PT Sigit Mitra Bangun + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 5acee47..23a6a90 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ `smbcloud-ascapi` is the app stores coolest API. -Seven crates, split by domain and layered so neither front end can drift +Eight crates, split by domain and layered so neither front end can drift from the other: | Crate | What it is | @@ -11,11 +11,12 @@ from the other: | `smbcloud-ascapi-aso` | App Metadata: apps, app infos, versions, builds, pre-release versions, review submissions, bundle IDs, localizations, screenshots | | `smbcloud-ascapi-pricing` | Pricing: app price schedules, and the per-territory prices joined with their price points and currencies | | `smbcloud-ascapi-signing` | Code signing: certificates and provisioning profiles, plus local RSA key pair and CSR generation | +| `smbcloud-ascapi-reports` | Sales reports: account-level sales data, as Apple's gzip-compressed TSV | | `smbcloud-ascapi-frontend` | Operations both surfaces share, so the CLI and the MCP server agree by construction, plus the CLI's `xcrun altool` upload | | `smbcloud-ascapi-mcp` | The MCP contract and stdio server | | `smbcloud-ascapi-cli` | The `asc` binary: clap command tree, plus `--mcp` | -`aso`, `pricing` and `signing` know nothing about each other, and neither knows +`aso`, `pricing`, `signing` and `reports` know nothing about each other, and neither knows anything about the front ends. Each adds its calls to `smbcloud_ascapi_core::Client` as **extension traits**, since Rust only allows inherent impls in the crate that defines a type: @@ -29,4 +30,4 @@ MCP Registry name: `mcp-name: io.github.smbcloudXYZ/ascapi` ## Copyright -© 2026 [Splitfire AB](https://5mb.app) ([smbCloud](https://smbcloud.xyz)). +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/aso/Cargo.toml b/crates/aso/Cargo.toml index 9a91f41..24c8d7b 100644 --- a/crates/aso/Cargo.toml +++ b/crates/aso/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "App Store Connect App Metadata resources: apps, app infos, versions, bundle IDs, localizations, and screenshots." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/aso/README.md b/crates/aso/README.md new file mode 100644 index 0000000..23548ff --- /dev/null +++ b/crates/aso/README.md @@ -0,0 +1,29 @@ +# smbcloud-ascapi-aso + +App Store Connect's App Metadata resources: apps, app infos and their +localizations, app store versions and their localizations, builds, beta +groups and review details, review submissions, bundle IDs, and screenshots. + +Every call is an extension trait on `smbcloud_ascapi_core::Client`. Import +the prelude to get all of them: + +```toml +[dependencies] +smbcloud-ascapi-core = "0.1" +smbcloud-ascapi-aso = "0.1" +``` + +```rust +use smbcloud_ascapi_core::{ApiKey, Client}; +use smbcloud_ascapi_aso::prelude::*; + +let api_key = ApiKey::from_p8_file("KEY_ID", "ISSUER_ID", "AuthKey.p8")?; +let client = Client::new(api_key); +let apps = client.list_apps(Some("com.example.app")).await?; +``` + +See the [API docs](https://docs.rs/smbcloud-ascapi-aso). + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/cli/README.md b/crates/cli/README.md index 540e6dc..471729c 100644 --- a/crates/cli/README.md +++ b/crates/cli/README.md @@ -110,4 +110,4 @@ Two deliberate absences: ## Copyright -© 2026 [Splitfire AB](https://5mb.app) ([smbCloud](https://smbcloud.xyz)). +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index d3ba34e..9cc657e 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "Shared transport for the App Store Connect API: JWT auth, the HTTP client, JSON:API envelopes, and error types." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/core/README.md b/crates/core/README.md new file mode 100644 index 0000000..cb91781 --- /dev/null +++ b/crates/core/README.md @@ -0,0 +1,26 @@ +# smbcloud-ascapi-core + +Shared transport for the App Store Connect API: ES256 JWT auth, an HTTP +client that caches tokens, JSON:API envelopes, and the error type. + +This is the base of the [smbcloud-ascapi](https://github.com/smbcloudXYZ/smbcloud-ascapi) +workspace. The domain crates add their calls to `Client` as extension +traits, so most users depend on one of those and get this one with it. + +```toml +[dependencies] +smbcloud-ascapi-core = "0.1" +``` + +```rust +use smbcloud_ascapi_core::{ApiKey, Client}; + +let api_key = ApiKey::from_p8_file("KEY_ID", "ISSUER_ID", "AuthKey.p8")?; +let client = Client::new(api_key); +``` + +See the [API docs](https://docs.rs/smbcloud-ascapi-core). + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/frontend/Cargo.toml b/crates/frontend/Cargo.toml index f3438e0..2b8904e 100644 --- a/crates/frontend/Cargo.toml +++ b/crates/frontend/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "Shared operations behind the asc command line and MCP surfaces: credential resolution, result shaping, certificate issuance, and altool uploads." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/frontend/README.md b/crates/frontend/README.md new file mode 100644 index 0000000..801b0b6 --- /dev/null +++ b/crates/frontend/README.md @@ -0,0 +1,20 @@ +# smbcloud-ascapi-frontend + +The operations the `asc` command line and its MCP server share: credential +resolution from the environment, result shaping, certificate issuance, +profile download, review submission, build processing waits, and the +`xcrun altool` upload. + +Keeping this in one crate means the two front ends agree by construction. +It also enforces the rule that results never carry key material or +certificate bodies, since one of the consumers is a language model. + +This is an internal building block of +[smbcloud-ascapi](https://github.com/smbcloudXYZ/smbcloud-ascapi). If you want +the tool, install [`smbcloud-ascapi-cli`](https://crates.io/crates/smbcloud-ascapi-cli). + +See the [API docs](https://docs.rs/smbcloud-ascapi-frontend). + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/mcp/Cargo.toml b/crates/mcp/Cargo.toml index 76979d2..662204a 100644 --- a/crates/mcp/Cargo.toml +++ b/crates/mcp/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "MCP server exposing the App Store Connect operations from smbcloud-ascapi over stdio." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/mcp/README.md b/crates/mcp/README.md new file mode 100644 index 0000000..643ee38 --- /dev/null +++ b/crates/mcp/README.md @@ -0,0 +1,23 @@ +# smbcloud-ascapi-mcp + +The MCP contract and stdio server for App Store Connect, behind +`asc --mcp`. It exposes the tool set the CLI has, minus certificate +revocation, which stays on the command line on purpose: it invalidates every +profile embedding the certificate, irreversibly. + +stdout belongs to the protocol, so nothing in this crate writes to it. +Tool results never include private keys or certificate bodies. + +Most users want the binary: + +```bash +cargo install smbcloud-ascapi-cli +asc --mcp +``` + +Embedders can use `ascapi_mcp_tools!` and `AscapiMcpServer` to re-expose +the same contract. See the [API docs](https://docs.rs/smbcloud-ascapi-mcp). + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/mcp/src/requests.rs b/crates/mcp/src/requests.rs index 48ebfb0..9065af9 100644 --- a/crates/mcp/src/requests.rs +++ b/crates/mcp/src/requests.rs @@ -98,7 +98,7 @@ pub struct AppStoreVersionCreateRequest { pub platform: String, /// Marketing version string, e.g. 1.2.0. pub version_string: String, - /// Copyright line, e.g. "2026 Splitfire AB". Optional. + /// Copyright line, e.g. "2026 PT Sigit Mitra Bangun". Optional. #[serde(default)] pub copyright: Option, } diff --git a/crates/pricing/Cargo.toml b/crates/pricing/Cargo.toml index d3d11c0..788958e 100644 --- a/crates/pricing/Cargo.toml +++ b/crates/pricing/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "App Store Connect pricing resources: app price schedules, and the per-territory prices and price points hanging off them." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/pricing/README.md b/crates/pricing/README.md new file mode 100644 index 0000000..0f53362 --- /dev/null +++ b/crates/pricing/README.md @@ -0,0 +1,31 @@ +# smbcloud-ascapi-pricing + +App Store Connect pricing: an app's price schedule, and the per-territory +prices and price points hanging off it. + +Reading a price takes a join across three resources, because an `appPrices` +row carries no money of its own. This crate does the join, so you get one +flat `TerritoryPrice` per territory with the amount and currency attached. + +```toml +[dependencies] +smbcloud-ascapi-core = "0.1" +smbcloud-ascapi-pricing = "0.1" +``` + +```rust +use smbcloud_ascapi_core::{ApiKey, Client}; +use smbcloud_ascapi_pricing::app_price::PriceKind; +use smbcloud_ascapi_pricing::prelude::*; + +let client = Client::new(ApiKey::from_p8_file("KEY_ID", "ISSUER_ID", "AuthKey.p8")?); +let prices = client + .list_app_prices("APP_ID", PriceKind::Automatic, Some("IDN")) + .await?; +``` + +See the [API docs](https://docs.rs/smbcloud-ascapi-pricing). + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/reports/Cargo.toml b/crates/reports/Cargo.toml index 6bd6e4e..92c4040 100644 --- a/crates/reports/Cargo.toml +++ b/crates/reports/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "Sales report downloads through the App Store Connect API." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/reports/README.md b/crates/reports/README.md new file mode 100644 index 0000000..4d58a61 --- /dev/null +++ b/crates/reports/README.md @@ -0,0 +1,36 @@ +# smbcloud-ascapi-reports + +Sales report downloads from App Store Connect. + +Apple returns these reports as gzip-compressed TSV rather than JSON:API. +This crate owns the request shape and hands back the raw bytes; you decide +how to persist or transform them. + +```toml +[dependencies] +smbcloud-ascapi-core = "0.1" +smbcloud-ascapi-reports = "0.1" +``` + +```rust +use smbcloud_ascapi_core::{ApiKey, Client}; +use smbcloud_ascapi_reports::{SalesReportRequest, SalesReportsApi}; + +let client = Client::new(ApiKey::from_p8_file("KEY_ID", "ISSUER_ID", "AuthKey.p8")?); +let gzipped_tsv = client + .download_sales_report(&SalesReportRequest { + vendor_number: "12345678".into(), + frequency: "DAILY".into(), + report_date: "2026-09-11".into(), + report_type: "SALES".into(), + report_subtype: "SUMMARY".into(), + version: None, + }) + .await?; +``` + +See the [API docs](https://docs.rs/smbcloud-ascapi-reports). + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/signing/Cargo.toml b/crates/signing/Cargo.toml index f7fbf26..d8c689e 100644 --- a/crates/signing/Cargo.toml +++ b/crates/signing/Cargo.toml @@ -6,6 +6,7 @@ authors.workspace = true license.workspace = true repository.workspace = true description = "Apple code signing through App Store Connect: certificates, plus local RSA key pair and CSR generation." +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/crates/signing/README.md b/crates/signing/README.md new file mode 100644 index 0000000..89d0139 --- /dev/null +++ b/crates/signing/README.md @@ -0,0 +1,29 @@ +# smbcloud-ascapi-signing + +Apple code signing through App Store Connect: certificates and provisioning +profiles, plus local RSA key pair and CSR generation. + +Apple never receives or returns a private key. You generate the key pair +locally, send Apple only a signing request, and keep the private key. A +certificate whose key file is lost is permanently unusable, and an expired +certificate cannot be renewed, only replaced. + +```toml +[dependencies] +smbcloud-ascapi-core = "0.1" +smbcloud-ascapi-signing = "0.1" +``` + +```rust +use smbcloud_ascapi_core::{ApiKey, Client}; +use smbcloud_ascapi_signing::prelude::*; + +let client = Client::new(ApiKey::from_p8_file("KEY_ID", "ISSUER_ID", "AuthKey.p8")?); +``` + +See the [API docs](https://docs.rs/smbcloud-ascapi-signing) for `csr`, +`certificate` and `profile`. + +## Copyright + +© 2026 PT Sigit Mitra Bangun ([smbCloud](https://smbcloud.xyz)). diff --git a/crates/signing/src/certificate.rs b/crates/signing/src/certificate.rs index b3058f4..91f128b 100644 --- a/crates/signing/src/certificate.rs +++ b/crates/signing/src/certificate.rs @@ -98,7 +98,7 @@ impl CertificateType { #[serde(rename_all = "camelCase")] pub struct CertificateAttributes { /// The certificate's common name, e.g. - /// `Apple Distribution: Splitfire AB (2TQF86ZACD)`. This is what + /// `Apple Distribution: PT Sigit Mitra Bangun (2TQF86ZACD)`. This is what /// `codesign --sign` matches when given a name rather than a hash. pub name: Option, pub certificate_type: Option,