diff --git a/site/src/api/api.ts b/site/src/api/api.ts index d1d7ba4795..203ba1855a 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -2787,6 +2787,46 @@ class ApiMethods { } satisfies TypesGen.UpdateTaskInputRequest); }; + getTaskLogs = async ( + user: string, + id: string, + ): Promise => { + const response = await this.axios.get( + `/api/v2/tasks/${user}/${id}/logs`, + ); + return response.data; + }; + + pauseTask = async ( + user: string, + id: string, + ): Promise => { + const response = await this.axios.post( + `/api/v2/tasks/${user}/${id}/pause`, + ); + return response.data; + }; + + resumeTask = async ( + user: string, + id: string, + ): Promise => { + const response = await this.axios.post( + `/api/v2/tasks/${user}/${id}/resume`, + ); + return response.data; + }; + + sendTaskInput = async ( + user: string, + id: string, + input: string, + ): Promise => { + await this.axios.post(`/api/v2/tasks/${user}/${id}/send`, { + input, + } satisfies TypesGen.TaskSendRequest); + }; + createTaskFeedback = async ( _taskId: string, _req: CreateTaskFeedbackRequest,