Skip to content

docs: sync Task publish/unpublish docs with apify-docs #2840 - #9

Merged
Pijukatel merged 2 commits into
masterfrom
claude/task-publish-permission-wording
Aug 16, 2026
Merged

docs: sync Task publish/unpublish docs with apify-docs #2840#9
Pijukatel merged 2 commits into
masterfrom
claude/task-publish-permission-wording

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

apify-docs PR #2840 formalized the PUT /actor-tasks/{actorTaskId} description: publishing/unpublishing a task (via isPublic) requires write permission to the task's Actor only, 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.

What changed

  • 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).

Compatibility

No breaking changes; docs/comments/version-constant only.

Verified locally: composer lint (php-cs-fixer, clean), unit tests (98/98), integration tests (59/59, including TaskIntegrationTest::testPublishUnpublish), and examples tests (44/44) against the live API.

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).
@github-actions github-actions Bot added this to the 147th sprint - Tooling team milestone Aug 15, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Aug 15, 2026
…est bodies

TaskIntegrationTest::testPublishUnpublish is token-gated and, by design, asserts publish()
fails against the shared test account's task (no publicConfig, foreign Actor) rather than
exercising a successful call. That leaves the one behavior fully under the client's control -
that publish() sends {"isPublic":true} and unpublish() sends {"isPublic":false} to the task
PUT endpoint - without offline coverage, unlike the RequestQueue typed-result refactor's
MockTransport suite.

Adds tests/Unit/TaskPublishUnpublishTest.php, asserting the HTTP method, path, and exact
request body for both methods via MockTransport.
@Pijukatel
Pijukatel merged commit bb8fa50 into master Aug 16, 2026
3 checks passed
@Pijukatel
Pijukatel deleted the claude/task-publish-permission-wording branch August 16, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants