UNPKG

@graphteon/juricode

Version:

We are forging the future with lines of digital steel

25 lines 895 B
import axios from 'axios'; export class FileService { constructor() { this.baseUrl = process.env.BACKEND_URL || 'http://localhost:4000'; } async getFiles(conversationId, path) { const response = await axios.get(`${this.baseUrl}/api/conversations/${conversationId}/list-files`, { params: { path } }); return response.data; } async getFile(conversationId, path) { const response = await axios.get(`${this.baseUrl}/api/conversations/${conversationId}/select-file`, { params: { file: path } }); return response.data.code; } async getWorkspaceZip(conversationId) { const response = await axios.get(`${this.baseUrl}/api/conversations/${conversationId}/zip-directory`, { responseType: 'blob' }); return response.data; } } //# sourceMappingURL=file.js.map