ArchAstro.V1.Tasks (archastro v0.2.0)

Copy Markdown

Task API resource.

Summary

Functions

activity(client, task, params \\ %ArchAstro.Types.Operations.GetApiV1TasksTaskActivity.Params{})

List a task's activity

Returns a bounded chronological page of activity for the specified task. App-scoped developer and server-to-server callers explicitly provide the owning team, user, or agent and org.

Successful response

blocking(client, task, params \\ %ArchAstro.Types.Operations.GetApiV1TasksTaskBlocking.Params{})

List the tasks a task blocks

Returns a bounded page of the tasks that the specified task is marked as blocking (the inverse of GET /tasks/{task}/blockers), newest first. The task's owner is resolved from the task itself.

Successful response

delete(client, task)

@spec delete(ArchAstro.Client.t(), String.t()) ::
  {:ok, :ok} | {:error, ArchAstro.Error.reason()}

Delete a task

Deletes a task from task lists and detail views. The task event stream is retained for auditability, while comments are removed and direct subtasks are promoted to top-level tasks.

The delete event is accepted before the read model is updated. Clients should remove the task from local collections immediately; subsequent reads converge once the projection processes the event.

Authenticated users may delete tasks they can access using their session identity. App-scoped developer and server-to-server callers must explicitly supply the task's org and owner. team or user identifies that owner; when neither is present, agent identifies an agent-owned task. With a team or user owner, agent identifies the acting principal. Each reference is validated before deletion.

Empty response. HTTP 204 is returned after the delete event is accepted.

get(client, task, params \\ %ArchAstro.Types.Operations.GetApiV1TasksTask.Params{})

Retrieve a task

Returns the full task object for the specified task ID. Authenticated users and agents resolve access through their session. App-scoped developer and server-to-server callers explicitly provide the owning team, user, or agent and org. Callers without access receive a 404.

The requested task.

replace(client, task, input)

Update a task

Updates the supplied fields on a task and returns the complete updated task. Authenticated users use their session identity. App-scoped developer and server-to-server callers must explicitly supply the task's org and owner. team or user identifies that owner; when neither is present, agent identifies an agent-owned task. With a team or user owner, agent identifies the acting principal. Every reference is validated before the update.

A cooperating coding-session client may supply both lease_id and lease_session_id. The task aggregate fences that update against the live lease and records server-sourced session provenance. Omitting both remains a normal authorized human/API update.

The updated task.

subtasks(client, task, params \\ %ArchAstro.Types.Operations.GetApiV1TasksTaskSubtasks.Params{})

List a task's subtasks

Returns a bounded page of the specified task's subtasks (tasks whose parent is this task), newest first. Subtasks nest exactly one level, so entries never have subtasks of their own. Privileged callers explicitly provide the owning team, user, or agent and org.

Successful response