(projectId: string, serverId: string, path: string, tailBytes?: number)
| 100 | } |
| 101 | |
| 102 | export async function readCliFile(projectId: string, serverId: string, path: string, tailBytes?: number) { |
| 103 | const response = await apiClient.get(`/api/v1/projects/${projectId}/cli/servers/${serverId}/file`, { |
| 104 | params: { path, tail_bytes: tailBytes }, |
| 105 | }) |
| 106 | return response.data as CliFileContentResponse |
| 107 | } |
| 108 | |
| 109 | export async function writeCliFile(projectId: string, serverId: string, payload: { path: string; content?: string; encoding?: string; operation?: string }) { |
| 110 | const response = await apiClient.post(`/api/v1/projects/${projectId}/cli/servers/${serverId}/file`, payload) |
no test coverage detected