Skip to content

Commit a31564f

Browse files
committed
docs: sync Task publish/unpublish docs with apify-docs #2840
apify-docs PR #2840 formalized the PUT /actor-tasks/{actorTaskId} description: publishing and unpublishing a task (via isPublic) require write permission to the task's Actor, not (as this client's docs stated, copied from the reference JS client) "both the task and its Actor." unpublish()'s docblock had gone further and claimed the opposite - that it needed only task-level permission - which directly contradicts the spec. - Corrected TaskClient::publish()/unpublish() docblocks and docs/tasks.md to match the spec's actual permission wording. - Added publish()'s concrete preconditions from the spec (Actor public, publicConfig.inputSchemaFields/datasetView set, Actor has fewer than 50 published tasks). - Bumped CLIENT_VERSION 0.5.0 -> 0.5.1 (patch: docs/comments only, no interface change). API_SPEC_VERSION is unchanged (v2-2026-08-05T133145Z already matches the live spec's info.version and already contains PR #2840's schema/description text).
1 parent 121364a commit a31564f

4 files changed

Lines changed: 21 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.5.1
4+
5+
- Corrected the write-permission wording on `TaskClient::publish()`/`unpublish()`: the OpenAPI spec
6+
states that both `isPublic` and `publicConfig` require write permission to the task's Actor, not
7+
(as `unpublish()`'s docblock previously claimed) permission to the task alone. `publish()`'s
8+
docblock now also states the Actor's fewer-than-50-published-tasks limit.
9+
- `docs/tasks.md` updated to match.
10+
311
## 0.5.0
412

513
Breaking: `RequestQueueClient` methods that previously returned a raw `array<string,mixed>` (or, for

docs/tasks.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ foreach ($client->tasks()->iterate(new ListOptions(), 50) as $t) {
2525

2626
- `get(): ?Task`, `update(mixed $newFields): Task`, `delete(): void`
2727
- `publish(): Task`, `unpublish(): Task` — publish/unpublish the task's public landing page, by
28-
setting `isPublic` through `update()`. Publishing requires the task's Actor to be public and the
29-
task to already have its `publicConfig` set up.
28+
setting `isPublic` through `update()`. Both require write permission to the task's Actor;
29+
publishing additionally requires the Actor to be public, to have fewer than 50 already-published
30+
tasks, and the task's `publicConfig.inputSchemaFields`/`publicConfig.datasetView` to be set.
3031
- `start(mixed $input = null, ?TaskStartOptions $options = null): ActorRun`
3132
- `call(mixed $input = null, ?TaskStartOptions $options = null, ?int $waitSecs = null): ActorRun`
3233
- `getInput(): mixed`, `updateInput(mixed $input): mixed`

src/Resource/TaskClient.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ public function delete(): void
5959

6060
/**
6161
* Publishes the task on its public landing page, by setting {@code isPublic} through
62-
* {@see update()}.
62+
* {@see update()}. Requires write permission to the task's Actor.
6363
*
64-
* The task's Actor must be public and the task must have its public display configuration
65-
* ({@code publicConfig}) set up first. Requires write permission to both the task and its
66-
* Actor. Publishing an already published task does nothing.
64+
* To publish, the task's Actor must be public, its {@code publicConfig.inputSchemaFields} and
65+
* {@code publicConfig.datasetView} must be set, and the Actor must have fewer than 50
66+
* published tasks; if any of these are not met, the request fails and nothing is changed.
67+
* Publishing an already published task does nothing.
6768
*/
6869
public function publish(): Task
6970
{
@@ -72,12 +73,12 @@ public function publish(): Task
7273

7374
/**
7475
* Unpublishes the task from its public landing page, by setting {@code isPublic} through
75-
* {@see update()}.
76+
* {@see update()}. Like {@see publish()}, this requires write permission to the task's Actor:
77+
* the API requires Actor write permission for both {@code isPublic} and {@code publicConfig}.
7678
*
7779
* The public display configuration ({@code publicConfig}) is preserved, so the task can be
78-
* published again without re-entering it. Unlike {@see publish()}, this only requires write
79-
* permission to the task itself (not its Actor), since it does not need to validate the
80-
* Actor's public/display eligibility. Unpublishing a task that is not published does nothing.
80+
* published again without re-entering it. Unpublishing a task that is not published does
81+
* nothing.
8182
*/
8283
public function unpublish(): Task
8384
{

src/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class Version
1717
* The semantic version of this client library (see https://semver.org/).
1818
* Changes to the public interface other than additive ones are considered breaking changes.
1919
*/
20-
public const CLIENT_VERSION = '0.5.0';
20+
public const CLIENT_VERSION = '0.5.1';
2121

2222
/**
2323
* The version of the Apify OpenAPI specification this client was generated and verified

0 commit comments

Comments
 (0)