This commit is contained in:
2026-03-14 16:17:04 -05:00
parent 9c8298c5e3
commit a8d0533f4a
2 changed files with 66 additions and 3 deletions

View File

@@ -93,6 +93,19 @@ export const api = {
}
return json.data;
},
async getFileContentBlob(token: string, fileId: string) {
const response = await fetch(`/api/v1/files/${fileId}/content`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
if (!response.ok) {
throw new ApiError("Unable to load file content.", "FILE_CONTENT_FAILED");
}
return response.blob();
},
getCustomers(token: string, filters?: { q?: string; status?: CrmRecordStatus; state?: string }) {
return request<CrmRecordSummaryDto[]>(
`/api/v1/crm/customers${buildQueryString({