From 02c8eabc0470eda7ebbb6f16b600fb0e83b07b97 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 12:56:35 +0000 Subject: [PATCH 1/4] chore: sync Rust client with Apify OpenAPI spec v2-2026-10-22T140011Z --- CHANGELOG.md | 11 +++++++++++ Cargo.toml | 2 +- docs/runs.md | 2 +- src/clients/run.rs | 6 ++++++ src/version.rs | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44dc505..52fb242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to the Rust Apify API client are documented here. The format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/). +## [0.14.1] - 2026-10-23 + +### Changed +- Synced with Apify OpenAPI spec `v2-2026-10-22T140011Z` (`API_SPEC_VERSION`). The spec delta + only documents the existing `requestId` charge field, the terminal run statuses accepted by + resurrect and the cost-limit behavior of resurrect; no request or response shapes changed. + +### Fixed +- Documented `RunClient::resurrect`: the terminal statuses it accepts and how + `max_total_charge_usd` applies to a run that reached its cost limit. + ## [0.14.0] - 2026-10-21 ### Added diff --git a/Cargo.toml b/Cargo.toml index c7c3b7d..551e8c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apify-client" -version = "0.14.0" +version = "0.14.1" authors = ["Apify Technologies "] description = "An official, but experimental, AI-generated and AI-maintained Rust client for the Apify API (https://apify.com)." license = "Apache-2.0" diff --git a/docs/runs.md b/docs/runs.md index 92fc8cc..c0361e6 100644 --- a/docs/runs.md +++ b/docs/runs.md @@ -21,7 +21,7 @@ collections are available via `actor.runs()` and `task.runs()`. | `metamorph(target, input, options)` | `&str`, `Option<&impl Serialize>`, `RunMetamorphOptions` | `ActorRun` | Transforms the run into another Actor. | | `metamorph_raw(target, input, options)` | `&str`, `&[u8]`, `RunMetamorphOptions` | `ActorRun` | Like `metamorph`, but sends `input` as a raw request body (no JSON serialization), paired with `options.content_type`. | | `reboot()` | — | `ActorRun` | Reboots the run's container. | -| `resurrect(options)` | `RunResurrectOptions` | `ActorRun` | Resurrects a finished run. | +| `resurrect(options)` | `RunResurrectOptions` | `ActorRun` | Resurrects a run in a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED`, `TIMED-OUT`). To continue a run that reached its cost limit, pass a higher `max_total_charge_usd`; the limit covers the whole run, including the cost before the resurrection. | | `charge(options)` | `RunChargeOptions` | `()` | Charges a pay-per-event run (always sends an idempotency key). | | `wait_for_finish(wait_secs)` | `Option` | `ActorRun` | Polls until the run is terminal. `None` waits indefinitely; `Some(n)` bounds the wait and may return a still-running (non-terminal) run if `n` elapses first. A run ID that keeps 404ing past a 3-second grace period (reset by any successful fetch) returns the `404` as an error instead of polling forever. | | `dataset()` / `key_value_store()` / `request_queue()` / `log()` | — | resource client | Access the run's default storages and log. | diff --git a/src/clients/run.rs b/src/clients/run.rs index 0eff6a1..11ff53c 100644 --- a/src/clients/run.rs +++ b/src/clients/run.rs @@ -208,6 +208,12 @@ impl RunClient { } /// Resurrects a finished run, starting it again with (optionally overridden) settings. + /// + /// Only runs in a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED` or `TIMED-OUT`) can be + /// resurrected. The run continues with the same storages, and its timeout counts from the + /// resurrection. `max_total_charge_usd` applies to the whole run including the cost before the + /// resurrection, so raise it to continue a run that stopped at its cost limit; otherwise the + /// resurrected run keeps the original limit and stops right after it starts. pub async fn resurrect(&self, options: RunResurrectOptions) -> ApifyClientResult { let mut params = QueryParams::new(); params diff --git a/src/version.rs b/src/version.rs index 11bdfc1..9c9ce1c 100644 --- a/src/version.rs +++ b/src/version.rs @@ -10,4 +10,4 @@ pub const CLIENT_VERSION: &str = env!("CARGO_PKG_VERSION"); /// and verified against. /// /// This corresponds to the `info.version` field of the Apify OpenAPI document. -pub const API_SPEC_VERSION: &str = "v2-2026-10-20T121847Z"; +pub const API_SPEC_VERSION: &str = "v2-2026-10-22T140011Z"; From 637f7bde1968c949dc03e9fc0b006a28f98c1461 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 13:02:56 +0000 Subject: [PATCH 2/4] fix: address review of the spec sync (cost-limit field docs, changelog, CI path filter) --- .github/workflows/rust-integration-tests.yml | 5 ++++- CHANGELOG.md | 6 +++--- docs/actors.md | 2 +- src/clients/actor.rs | 2 +- src/clients/run.rs | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust-integration-tests.yml b/.github/workflows/rust-integration-tests.yml index 860d067..171840f 100644 --- a/.github/workflows/rust-integration-tests.yml +++ b/.github/workflows/rust-integration-tests.yml @@ -1,7 +1,7 @@ name: Rust integration tests # Language-specific workflow: only runs for the Rust client. Triggers on PRs to master -# that touch Rust client or test code, and can be dispatched manually from any branch. +# that touch Rust client, test, docs or build code, and can be dispatched manually from any branch. on: pull_request: branches: [master] @@ -9,6 +9,9 @@ on: - 'src/**' - 'tests/**' - 'examples/**' + - 'docs/**' + - 'README.md' + - 'build.rs' - 'Cargo.toml' - 'Cargo.lock' - '.github/workflows/rust-integration-tests.yml' diff --git a/CHANGELOG.md b/CHANGELOG.md index 52fb242..0c66c5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,13 @@ to [Semantic Versioning](https://semver.org/). ## [0.14.1] - 2026-10-23 ### Changed -- Synced with Apify OpenAPI spec `v2-2026-10-22T140011Z` (`API_SPEC_VERSION`). The spec delta - only documents the existing `requestId` charge field, the terminal run statuses accepted by - resurrect and the cost-limit behavior of resurrect; no request or response shapes changed. +- Synced with Apify OpenAPI spec `v2-2026-10-22T140011Z` (`API_SPEC_VERSION`). ### Fixed - Documented `RunClient::resurrect`: the terminal statuses it accepts and how `max_total_charge_usd` applies to a run that reached its cost limit. +- Corrected the `max_total_charge_usd` field docs: it caps the total cost of the run for all + pricing models, not only pay-per-event Actors. ## [0.14.0] - 2026-10-21 diff --git a/docs/actors.md b/docs/actors.md index 31059e5..5b382d3 100644 --- a/docs/actors.md +++ b/docs/actors.md @@ -46,7 +46,7 @@ All fields are optional. Used by both `start` and `call` here, and by the identi | `timeout_secs` | `Option` | Timeout for the run in seconds (`0` means no timeout). | | `wait_for_finish` | `Option` | Maximum seconds to wait server-side for the run to finish (max 60). | | `max_items` | `Option` | Maximum number of dataset items to charge (pay-per-result Actors). | -| `max_total_charge_usd` | `Option` | Maximum total charge in USD (pay-per-event Actors). | +| `max_total_charge_usd` | `Option` | Maximum total cost of the run in USD, across all pricing models. | | `content_type` | `Option` | Content type of the input body. Defaults to `application/json` for `start`/`call`, or `application/octet-stream` for `start_raw`/`call_raw`, when unset. | | `restart_on_error` | `Option` | Whether to restart the run if it fails. | | `force_permission_level` | `Option` | Override the Actor's permission level for this run. | diff --git a/src/clients/actor.rs b/src/clients/actor.rs index 6f9f5a1..f177255 100644 --- a/src/clients/actor.rs +++ b/src/clients/actor.rs @@ -44,7 +44,7 @@ pub struct ActorStartOptions { pub wait_for_finish: Option, /// Maximum number of dataset items to charge (pay-per-result Actors). pub max_items: Option, - /// Maximum total charge in USD (pay-per-event Actors). + /// Maximum total cost of the run in USD, across all pricing models. pub max_total_charge_usd: Option, /// Content type of the input body. Defaults to `application/json`. pub content_type: Option, diff --git a/src/clients/run.rs b/src/clients/run.rs index 11ff53c..55e09df 100644 --- a/src/clients/run.rs +++ b/src/clients/run.rs @@ -47,7 +47,7 @@ pub struct RunResurrectOptions { pub timeout_secs: Option, /// Maximum number of dataset items to charge (pay-per-result Actors). pub max_items: Option, - /// Maximum total charge in USD (pay-per-event Actors). + /// Maximum total cost of the run in USD, across all pricing models. pub max_total_charge_usd: Option, /// If `true`, restart the run automatically when it fails. pub restart_on_error: Option, From 3c032b0e2527eb6a7bd9cfdc547e9ce6decf7330 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 15:03:45 +0000 Subject: [PATCH 3/4] chore: sync Rust client with Apify OpenAPI spec v2-2026-10-26T112451Z Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Ke3CPtJK4Qn5nyv53MiwfH --- CHANGELOG.md | 2 +- src/version.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c66c5f..1d142a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ to [Semantic Versioning](https://semver.org/). ## [0.14.1] - 2026-10-23 ### Changed -- Synced with Apify OpenAPI spec `v2-2026-10-22T140011Z` (`API_SPEC_VERSION`). +- Synced with Apify OpenAPI spec `v2-2026-10-26T112451Z` (`API_SPEC_VERSION`). ### Fixed - Documented `RunClient::resurrect`: the terminal statuses it accepts and how diff --git a/src/version.rs b/src/version.rs index 9c9ce1c..50ea1cb 100644 --- a/src/version.rs +++ b/src/version.rs @@ -10,4 +10,4 @@ pub const CLIENT_VERSION: &str = env!("CARGO_PKG_VERSION"); /// and verified against. /// /// This corresponds to the `info.version` field of the Apify OpenAPI document. -pub const API_SPEC_VERSION: &str = "v2-2026-10-22T140011Z"; +pub const API_SPEC_VERSION: &str = "v2-2026-10-26T112451Z"; From f6cc53707a5457ecf0d6998e4a5d891a1fe7cc96 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 15:08:09 +0000 Subject: [PATCH 4/4] docs: date the 0.14.1 changelog entry on its spec sync Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Ke3CPtJK4Qn5nyv53MiwfH --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d142a4..ab50197 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to the Rust Apify API client are documented here. The format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/). -## [0.14.1] - 2026-10-23 +## [0.14.1] - 2026-10-26 ### Changed - Synced with Apify OpenAPI spec `v2-2026-10-26T112451Z` (`API_SPEC_VERSION`).