refactor(actions): extract fileClient with phase22 coverage

This commit is contained in:
2026-03-25 10:59:20 +00:00
parent 93eb19d028
commit a66d55af80
6 changed files with 214 additions and 28 deletions
+23
View File
@@ -0,0 +1,23 @@
import { getJson, requestJson } from "./endpointClient";
import { buildHashedQueryUrl } from "./relayClient";
export const getFileJson = (url) => {
return getJson(url);
};
export const getSignedFileJson = async (queryUrl) => {
const signedUrl = await buildHashedQueryUrl(queryUrl);
return requestJson({
method: "get",
url: signedUrl
});
};
export const downloadFileBlob = (url) => {
return requestJson({
method: "get",
url,
responseType: "blob"
});
};