feat: add Actor task publication endpoints - #989
Conversation
|
See more at https://github.com/apify/apify-client-js/actions/runs/30812758842#summary-91683107965 |
Waiting for apify/apify-docs#2840 |
| categorization?: string | null; | ||
| inputSchemaFields?: string[] | null; | ||
| datasetName?: string | null; | ||
| datasetView?: string | null; |
There was a problem hiding this comment.
Important: You're missing highlightedFields?: string[] | null as far as I remember
There was a problem hiding this comment.
It's stale no? I don't think it's used anywhere and if we decide to use it, the I would add it to public facing API, wdyt?
| * The public display configuration (`publicConfig`) is preserved, so the task can be | ||
| * published again without re-entering it. | ||
| * | ||
| * @returns The task object. |
There was a problem hiding this comment.
Suggestion: Worth documenting that unpublish() is not idempotent while publish() is — the API throws cannotUnpublishActorTask when the task isn't published whereas publishing an already-published task returns 200.
| * The task's Actor must be public and the task must have its public display configuration | ||
| * (`publicConfig`) set up via {@apilink TaskClient.update}. |
There was a problem hiding this comment.
Suggestion: I would also mention that you need write access to the Actor.
| export type TaskUpdateData = Partial< | ||
| Pick<Task, 'name' | 'title' | 'description' | 'options' | 'input' | 'actorStandby'> | ||
| >; | ||
| > & { publicConfig?: Omit<TaskPublicConfig, 'publishedAt'> | null }; |
There was a problem hiding this comment.
Question: | null suggests that you can nullify this publicConfig object which you technically can't (we just ignore it while updating the rest) so I would probably drop it here and also in apify-core, WDYT?
Part of https://github.com/apify/apify-core/issues/29471
Add ability to publish and un-publish tasks via new API
Blocked by https://github.com/apify/apify-core/pull/29623