@gen3/core 0.10.61 → 0.10.62
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/cjs/index.js
CHANGED
|
@@ -65,10 +65,6 @@ const FILE_DELIMITERS = {
|
|
|
65
65
|
csv: ','
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
// import { selectCSRFToken } from '../user/userSliceRTK';
|
|
69
|
-
// import { coreStore } from '../../store';
|
|
70
|
-
// import { prepareUrl } from '../../utils';
|
|
71
|
-
// import { getCookie } from 'cookies-next';
|
|
72
68
|
/**
|
|
73
69
|
* Template for fence error response dict
|
|
74
70
|
* @returns: An error dict response from a RESTFUL API request
|
|
@@ -2102,7 +2098,7 @@ const { useGetRawDataAndTotalCountsQuery, useGetAccessibleDataQuery, useGetAllFi
|
|
|
2102
2098
|
*
|
|
2103
2099
|
* @param {string} apiUrl - The base URL to be used for preparing the download URL.
|
|
2104
2100
|
* @returns {URL} - The prepared download URL as a URL object.
|
|
2105
|
-
*/ const prepareUrl$1 = (apiUrl)
|
|
2101
|
+
*/ const prepareUrl$1 = (apiUrl)=>`${apiUrl}/download`;
|
|
2106
2102
|
/**
|
|
2107
2103
|
* Prepares a fetch configuration object for downloading files from Guppy.
|
|
2108
2104
|
*
|
|
@@ -2244,7 +2240,7 @@ const useGetIndexFields = (index)=>{
|
|
|
2244
2240
|
return {
|
|
2245
2241
|
url: `${GEN3_GUPPY_API}/download`,
|
|
2246
2242
|
method: 'POST',
|
|
2247
|
-
queryBody,
|
|
2243
|
+
body: JSON.stringify(queryBody),
|
|
2248
2244
|
cache: 'no-cache'
|
|
2249
2245
|
};
|
|
2250
2246
|
},
|
|
@@ -2357,7 +2353,6 @@ const fetchFencePresignedURL = async ({ guid, method = 'GET', onAbort = ()=>null
|
|
|
2357
2353
|
}
|
|
2358
2354
|
if (csrfToken) headers.set('X-CSRF-Token', csrfToken);
|
|
2359
2355
|
if (accessToken) headers.set('Authorization', `Bearer ${accessToken}`);
|
|
2360
|
-
// const url = prepareDownloadUrl(`${GEN3_FENCE_API}/user`, guid);
|
|
2361
2356
|
const url = `${GEN3_FENCE_API}/user/download/${guid}`;
|
|
2362
2357
|
try {
|
|
2363
2358
|
const response = await fetch(url, {
|
|
@@ -2381,8 +2376,7 @@ const fetchFencePresignedURL = async ({ guid, method = 'GET', onAbort = ()=>null
|
|
|
2381
2376
|
}
|
|
2382
2377
|
throw new HTTPError(response.status, errorMessage, errorData);
|
|
2383
2378
|
}
|
|
2384
|
-
|
|
2385
|
-
return jsonData;
|
|
2379
|
+
return await response.json();
|
|
2386
2380
|
} catch (error) {
|
|
2387
2381
|
if (error instanceof Error) {
|
|
2388
2382
|
if (error.name === 'AbortError') {
|