From 66fc913fe61dfdad778f603dd3d177addd36974c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Proch=C3=A1zka?= Date: Fri, 4 Sep 2026 22:08:37 +0000 Subject: [PATCH 1/2] chore: sync PHP client with Apify OpenAPI spec v2-2026-09-02T154542Z - Add Task::getDescription() getter for the new Task.description field. - Correct the published-tasks limit in TaskClient::publish() and docs/tasks.md from 50 to 10, matching the apify-docs publish-task requirements. --- CHANGELOG.md | 8 ++++++++ docs/models.md | 1 + docs/tasks.md | 2 +- src/Model/Task.php | 6 ++++++ src/Resource/TaskClient.php | 2 +- src/Version.php | 4 ++-- tests/Integration/TaskIntegrationTest.php | 3 +++ 7 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99fce03..d15e6cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.6.0 + +- Synced to Apify OpenAPI spec `v2-2026-09-02T154542Z`. +- Added `Task::getDescription()` getter, exposing the task's public-landing-page description + (matching the reference JS client's `Task.description`). +- Corrected the published-tasks limit in `TaskClient::publish()`'s docblock and `docs/tasks.md`: + the requirement is fewer than 10 already-published tasks on the Actor, not 50. + ## 0.5.3 - Bumped `Version::API_SPEC_VERSION` to the Apify OpenAPI spec `v2-2026-08-27T071624Z`. diff --git a/docs/models.md b/docs/models.md index e08a598..f1facb4 100644 --- a/docs/models.md +++ b/docs/models.md @@ -70,6 +70,7 @@ model is also used as an input object and therefore additionally exposes setters | `getUserId(): ?string` | ID of the task owner. | | `getName(): ?string` | The task's technical name. | | `getTitle(): ?string` | Human-readable title. | +| `getDescription(): ?string` | Human-readable description shown on the task's public landing page. | | `getCreatedAt(): ?string` | ISO-8601 creation timestamp. | | `getModifiedAt(): ?string` | ISO-8601 last-modification timestamp. | | `isPublic(): ?bool` | Whether the task is published on its public landing page. | diff --git a/docs/tasks.md b/docs/tasks.md index 61444a2..1b08bee 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -26,7 +26,7 @@ foreach ($client->tasks()->iterate(new ListOptions(), 50) as $t) { - `get(): ?Task`, `update(mixed $newFields): Task`, `delete(): void` - `publish(): Task`, `unpublish(): Task` — publish/unpublish the task's public landing page, by setting `isPublic` through `update()`. Both require write permission to the task's Actor; - publishing additionally requires the Actor to be public, to have fewer than 50 already-published + publishing additionally requires the Actor to be public, to have fewer than 10 already-published tasks, and the task's `publicConfig.inputSchemaFields`/`publicConfig.datasetView` to be set. - `start(mixed $input = null, ?TaskStartOptions $options = null): ActorRun` - `call(mixed $input = null, ?TaskStartOptions $options = null, ?int $waitSecs = null): ActorRun` diff --git a/src/Model/Task.php b/src/Model/Task.php index 693af48..9e8b75e 100644 --- a/src/Model/Task.php +++ b/src/Model/Task.php @@ -37,6 +37,12 @@ public function getTitle(): ?string return $this->getString('title'); } + /** The human-readable description shown on the task's public landing page. */ + public function getDescription(): ?string + { + return $this->getString('description'); + } + /** When the task was created (ISO-8601 string). */ public function getCreatedAt(): ?string { diff --git a/src/Resource/TaskClient.php b/src/Resource/TaskClient.php index d04f814..bb09a56 100644 --- a/src/Resource/TaskClient.php +++ b/src/Resource/TaskClient.php @@ -62,7 +62,7 @@ public function delete(): void * {@see update()}. Requires write permission to the task's Actor. * * To publish, the task's Actor must be public, its {@code publicConfig.inputSchemaFields} and - * {@code publicConfig.datasetView} must be set, and the Actor must have fewer than 50 + * {@code publicConfig.datasetView} must be set, and the Actor must have fewer than 10 * published tasks; if any of these are not met, the request fails and nothing is changed. * Publishing an already published task does nothing. */ diff --git a/src/Version.php b/src/Version.php index a8350da..102349f 100644 --- a/src/Version.php +++ b/src/Version.php @@ -17,13 +17,13 @@ final class Version * The semantic version of this client library (see https://semver.org/). * Changes to the public interface other than additive ones are considered breaking changes. */ - public const CLIENT_VERSION = '0.5.3'; + public const CLIENT_VERSION = '0.6.0'; /** * The version of the Apify OpenAPI specification this client was generated and verified * against. Corresponds to the {@code info.version} field of the Apify OpenAPI document. */ - public const API_SPEC_VERSION = 'v2-2026-08-27T071624Z'; + public const API_SPEC_VERSION = 'v2-2026-09-02T154542Z'; private function __construct() { diff --git a/tests/Integration/TaskIntegrationTest.php b/tests/Integration/TaskIntegrationTest.php index 29bbade..4fd14e4 100644 --- a/tests/Integration/TaskIntegrationTest.php +++ b/tests/Integration/TaskIntegrationTest.php @@ -107,6 +107,9 @@ public function testTaskCrudFlow(): void $tc->updateInput(['message' => 'updated']); self::assertNotNull($tc->getInput()); $tc->update(['name' => self::uniqueName('task-renamed')]); + $updated = $tc->update(['title' => 'Updated Title', 'description' => 'Updated description']); + self::assertSame('Updated Title', $updated->getTitle()); + self::assertSame('Updated description', $updated->getDescription()); $tc->runs()->list(new ListOptions(), new RunListOptions()); } finally { $client->task((string) $task->getId())->delete(); From 5a8db61a7c8e5fdf113de1fa4b708b70884202eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Proch=C3=A1zka?= Date: Fri, 4 Sep 2026 22:28:23 +0000 Subject: [PATCH 2/2] fix: revert publish-limit to 50 and de-scope description docblock - Revert TaskClient::publish()'s docblock and docs/tasks.md from "fewer than 10" back to "fewer than 50" published tasks. The published OpenAPI spec v2-2026-09-02T154542Z (the version this client names) still states 50; a separate platform docs page is not the authoritative source for this client. - Reword Task::getDescription() and its docs/models.md row to drop the "public landing page" framing, matching the neutral getTitle() style; the field is a plain description with no landing-page-only semantics. - Fold the two back-to-back update() calls in TaskIntegrationTest::testTaskCrudFlow into a single call. --- CHANGELOG.md | 4 +--- docs/models.md | 2 +- docs/tasks.md | 2 +- src/Model/Task.php | 2 +- src/Resource/TaskClient.php | 2 +- tests/Integration/TaskIntegrationTest.php | 7 +++++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d15e6cf..78ebc50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,8 @@ ## 0.6.0 - Synced to Apify OpenAPI spec `v2-2026-09-02T154542Z`. -- Added `Task::getDescription()` getter, exposing the task's public-landing-page description +- Added `Task::getDescription()` getter, exposing the task's human-readable description (matching the reference JS client's `Task.description`). -- Corrected the published-tasks limit in `TaskClient::publish()`'s docblock and `docs/tasks.md`: - the requirement is fewer than 10 already-published tasks on the Actor, not 50. ## 0.5.3 diff --git a/docs/models.md b/docs/models.md index f1facb4..016208a 100644 --- a/docs/models.md +++ b/docs/models.md @@ -70,7 +70,7 @@ model is also used as an input object and therefore additionally exposes setters | `getUserId(): ?string` | ID of the task owner. | | `getName(): ?string` | The task's technical name. | | `getTitle(): ?string` | Human-readable title. | -| `getDescription(): ?string` | Human-readable description shown on the task's public landing page. | +| `getDescription(): ?string` | Human-readable description of the task. | | `getCreatedAt(): ?string` | ISO-8601 creation timestamp. | | `getModifiedAt(): ?string` | ISO-8601 last-modification timestamp. | | `isPublic(): ?bool` | Whether the task is published on its public landing page. | diff --git a/docs/tasks.md b/docs/tasks.md index 1b08bee..61444a2 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -26,7 +26,7 @@ foreach ($client->tasks()->iterate(new ListOptions(), 50) as $t) { - `get(): ?Task`, `update(mixed $newFields): Task`, `delete(): void` - `publish(): Task`, `unpublish(): Task` — publish/unpublish the task's public landing page, by setting `isPublic` through `update()`. Both require write permission to the task's Actor; - publishing additionally requires the Actor to be public, to have fewer than 10 already-published + publishing additionally requires the Actor to be public, to have fewer than 50 already-published tasks, and the task's `publicConfig.inputSchemaFields`/`publicConfig.datasetView` to be set. - `start(mixed $input = null, ?TaskStartOptions $options = null): ActorRun` - `call(mixed $input = null, ?TaskStartOptions $options = null, ?int $waitSecs = null): ActorRun` diff --git a/src/Model/Task.php b/src/Model/Task.php index 9e8b75e..c4e784b 100644 --- a/src/Model/Task.php +++ b/src/Model/Task.php @@ -37,7 +37,7 @@ public function getTitle(): ?string return $this->getString('title'); } - /** The human-readable description shown on the task's public landing page. */ + /** The human-readable description of the task. */ public function getDescription(): ?string { return $this->getString('description'); diff --git a/src/Resource/TaskClient.php b/src/Resource/TaskClient.php index bb09a56..d04f814 100644 --- a/src/Resource/TaskClient.php +++ b/src/Resource/TaskClient.php @@ -62,7 +62,7 @@ public function delete(): void * {@see update()}. Requires write permission to the task's Actor. * * To publish, the task's Actor must be public, its {@code publicConfig.inputSchemaFields} and - * {@code publicConfig.datasetView} must be set, and the Actor must have fewer than 10 + * {@code publicConfig.datasetView} must be set, and the Actor must have fewer than 50 * published tasks; if any of these are not met, the request fails and nothing is changed. * Publishing an already published task does nothing. */ diff --git a/tests/Integration/TaskIntegrationTest.php b/tests/Integration/TaskIntegrationTest.php index 4fd14e4..6f6c330 100644 --- a/tests/Integration/TaskIntegrationTest.php +++ b/tests/Integration/TaskIntegrationTest.php @@ -106,8 +106,11 @@ public function testTaskCrudFlow(): void self::assertNotNull($tc->get()); $tc->updateInput(['message' => 'updated']); self::assertNotNull($tc->getInput()); - $tc->update(['name' => self::uniqueName('task-renamed')]); - $updated = $tc->update(['title' => 'Updated Title', 'description' => 'Updated description']); + $updated = $tc->update([ + 'name' => self::uniqueName('task-renamed'), + 'title' => 'Updated Title', + 'description' => 'Updated description', + ]); self::assertSame('Updated Title', $updated->getTitle()); self::assertSame('Updated description', $updated->getDescription()); $tc->runs()->list(new ListOptions(), new RunListOptions());