@gen3/core 0.10.61 → 0.10.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +3 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -9
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -1
package/dist/esm/index.js
CHANGED
|
@@ -45,10 +45,6 @@ const FILE_DELIMITERS = {
|
|
|
45
45
|
csv: ','
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
// import { selectCSRFToken } from '../user/userSliceRTK';
|
|
49
|
-
// import { coreStore } from '../../store';
|
|
50
|
-
// import { prepareUrl } from '../../utils';
|
|
51
|
-
// import { getCookie } from 'cookies-next';
|
|
52
48
|
/**
|
|
53
49
|
* Template for fence error response dict
|
|
54
50
|
* @returns: An error dict response from a RESTFUL API request
|
|
@@ -2082,7 +2078,7 @@ const { useGetRawDataAndTotalCountsQuery, useGetAccessibleDataQuery, useGetAllFi
|
|
|
2082
2078
|
*
|
|
2083
2079
|
* @param {string} apiUrl - The base URL to be used for preparing the download URL.
|
|
2084
2080
|
* @returns {URL} - The prepared download URL as a URL object.
|
|
2085
|
-
*/ const prepareUrl$1 = (apiUrl)
|
|
2081
|
+
*/ const prepareUrl$1 = (apiUrl)=>`${apiUrl}/download`;
|
|
2086
2082
|
/**
|
|
2087
2083
|
* Prepares a fetch configuration object for downloading files from Guppy.
|
|
2088
2084
|
*
|
|
@@ -2224,7 +2220,7 @@ const useGetIndexFields = (index)=>{
|
|
|
2224
2220
|
return {
|
|
2225
2221
|
url: `${GEN3_GUPPY_API}/download`,
|
|
2226
2222
|
method: 'POST',
|
|
2227
|
-
queryBody,
|
|
2223
|
+
body: JSON.stringify(queryBody),
|
|
2228
2224
|
cache: 'no-cache'
|
|
2229
2225
|
};
|
|
2230
2226
|
},
|
|
@@ -2337,7 +2333,6 @@ const fetchFencePresignedURL = async ({ guid, method = 'GET', onAbort = ()=>null
|
|
|
2337
2333
|
}
|
|
2338
2334
|
if (csrfToken) headers.set('X-CSRF-Token', csrfToken);
|
|
2339
2335
|
if (accessToken) headers.set('Authorization', `Bearer ${accessToken}`);
|
|
2340
|
-
// const url = prepareDownloadUrl(`${GEN3_FENCE_API}/user`, guid);
|
|
2341
2336
|
const url = `${GEN3_FENCE_API}/user/download/${guid}`;
|
|
2342
2337
|
try {
|
|
2343
2338
|
const response = await fetch(url, {
|
|
@@ -2361,8 +2356,7 @@ const fetchFencePresignedURL = async ({ guid, method = 'GET', onAbort = ()=>null
|
|
|
2361
2356
|
}
|
|
2362
2357
|
throw new HTTPError(response.status, errorMessage, errorData);
|
|
2363
2358
|
}
|
|
2364
|
-
|
|
2365
|
-
return jsonData;
|
|
2359
|
+
return await response.json();
|
|
2366
2360
|
} catch (error) {
|
|
2367
2361
|
if (error instanceof Error) {
|
|
2368
2362
|
if (error.name === 'AbortError') {
|