@gen3/core 0.12.5 → 0.12.6
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/LICENSE +201 -0
- package/dist/cjs/index.js +107 -117
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/dataLibrary/useDataLibrary.d.ts +0 -1
- package/dist/dts/features/dataLibrary/useDataLibrary.d.ts.map +1 -1
- package/dist/dts/features/guppy/guppyApi.d.ts.map +1 -1
- package/dist/dts/features/guppy/guppyDownloadSlice.d.ts.map +1 -1
- package/dist/dts/features/guppy/guppySlice.d.ts.map +1 -1
- package/dist/dts/features/guppy/utils.d.ts.map +1 -1
- package/dist/dts/hooks.d.ts +8 -8
- package/dist/dts/reducers.d.ts +8 -8
- package/dist/dts/store.d.ts +16 -16
- package/dist/dts/store.d.ts.map +1 -1
- package/dist/dts/types/types.d.ts +1 -1
- package/dist/dts/types/types.d.ts.map +1 -1
- package/dist/esm/index.js +107 -117
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +20 -21
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1333,7 +1333,7 @@ interface GuppyAggregationsResponse {
|
|
|
1333
1333
|
* @interface ManifestItem
|
|
1334
1334
|
*/
|
|
1335
1335
|
interface ManifestItem {
|
|
1336
|
-
[k: string]: string | number | undefined;
|
|
1336
|
+
[k: string]: string | number | boolean | string[] | undefined;
|
|
1337
1337
|
object_id: string;
|
|
1338
1338
|
file_size?: number;
|
|
1339
1339
|
file_name?: string;
|
|
@@ -1385,6 +1385,25 @@ interface FetchRequest {
|
|
|
1385
1385
|
readonly isJSON?: boolean;
|
|
1386
1386
|
}
|
|
1387
1387
|
|
|
1388
|
+
/**
|
|
1389
|
+
* Performs an asynchronous HTTP request to the Gen3 Fence API and processes the response.
|
|
1390
|
+
*
|
|
1391
|
+
* @template T The expected type of the response data.
|
|
1392
|
+
* @param {FetchRequest} options The options for the fetch request.
|
|
1393
|
+
* @param {string} options.endpoint The API endpoint to which the request will be sent.
|
|
1394
|
+
* @param {Record<string, string>} options.headers An object representing the HTTP headers to include in the request.
|
|
1395
|
+
* @param {Record<string, any>} [options.body={}] The request body to send with the fetch, used if the HTTP method is POST.
|
|
1396
|
+
* @param {string} [options.method='GET'] The HTTP method for the request (e.g., 'GET', 'POST').
|
|
1397
|
+
* @param {boolean} [options.isJSON=true] Determines if the response should be parsed as JSON or returned as plain text.
|
|
1398
|
+
* @param useService { boolean } Uses fence_service instead of public fence API
|
|
1399
|
+
* @returns {Promise<Gen3FenceResponse<T>>} A promise that resolves to the parsed data and response status
|
|
1400
|
+
* or rejects with an error if the request fails.
|
|
1401
|
+
* @throws {Error} Throws an error if the fetch request fails or the response is not successful.
|
|
1402
|
+
*/
|
|
1403
|
+
declare const fetchFence: <T>({ endpoint, headers, body, method, isJSON }: FetchRequest, useService?: boolean) => Promise<Gen3FenceResponse<T>>;
|
|
1404
|
+
|
|
1405
|
+
declare const isFetchError: <T>(obj: unknown) => obj is FetchError<T>;
|
|
1406
|
+
|
|
1388
1407
|
interface PayModel {
|
|
1389
1408
|
bmh_workspace_id: string;
|
|
1390
1409
|
workspace_type: string;
|
|
@@ -2954,25 +2973,6 @@ declare const useGetJWKKeysQuery: <R extends Record<string, any> = _reduxjs_tool
|
|
|
2954
2973
|
refetch: () => _reduxjs_toolkit_query.QueryActionCreatorResult<_reduxjs_toolkit_query.QueryDefinition<void, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "fenceJWT", readonly JWTKeys[], "gen3Services", unknown>>;
|
|
2955
2974
|
};
|
|
2956
2975
|
|
|
2957
|
-
declare const isFetchError: <T>(obj: unknown) => obj is FetchError<T>;
|
|
2958
|
-
|
|
2959
|
-
/**
|
|
2960
|
-
* Performs an asynchronous HTTP request to the Gen3 Fence API and processes the response.
|
|
2961
|
-
*
|
|
2962
|
-
* @template T The expected type of the response data.
|
|
2963
|
-
* @param {FetchRequest} options The options for the fetch request.
|
|
2964
|
-
* @param {string} options.endpoint The API endpoint to which the request will be sent.
|
|
2965
|
-
* @param {Record<string, string>} options.headers An object representing the HTTP headers to include in the request.
|
|
2966
|
-
* @param {Record<string, any>} [options.body={}] The request body to send with the fetch, used if the HTTP method is POST.
|
|
2967
|
-
* @param {string} [options.method='GET'] The HTTP method for the request (e.g., 'GET', 'POST').
|
|
2968
|
-
* @param {boolean} [options.isJSON=true] Determines if the response should be parsed as JSON or returned as plain text.
|
|
2969
|
-
* @param useService { boolean } Uses fence_service instead of public fence API
|
|
2970
|
-
* @returns {Promise<Gen3FenceResponse<T>>} A promise that resolves to the parsed data and response status
|
|
2971
|
-
* or rejects with an error if the request fails.
|
|
2972
|
-
* @throws {Error} Throws an error if the fetch request fails or the response is not successful.
|
|
2973
|
-
*/
|
|
2974
|
-
declare const fetchFence: <T>({ endpoint, headers, body, method, isJSON }: FetchRequest, useService?: boolean) => Promise<Gen3FenceResponse<T>>;
|
|
2975
|
-
|
|
2976
2976
|
interface guppyFetchError {
|
|
2977
2977
|
readonly url: string;
|
|
2978
2978
|
readonly status: number;
|
|
@@ -13465,7 +13465,6 @@ interface UseDataLibraryResult {
|
|
|
13465
13465
|
deleteListFromDataLibrary: (id: string) => Promise<StorageOperationResults>;
|
|
13466
13466
|
clearLibrary: () => Promise<StorageOperationResults>;
|
|
13467
13467
|
setAllListsInDataLibrary: (data: Array<LibraryListItemsGroupedByDataset>) => Promise<StorageOperationResults>;
|
|
13468
|
-
setLoginState: (loggedIn: boolean) => void;
|
|
13469
13468
|
getDatalist: (id: string) => Datalist;
|
|
13470
13469
|
}
|
|
13471
13470
|
declare const useDataLibrary: (options?: UseDataLibraryOptions) => UseDataLibraryResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gen3/core",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"author": "CTDS",
|
|
5
5
|
"description": "Core module for Gen3.2. Packages provides an interface for interacting with the gen3 API, various types, and a redux store for managing state.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"files": [
|
|
81
81
|
"dist"
|
|
82
82
|
],
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "64ca0a35153af5724f5c03a68cbab09cf234fea4"
|
|
84
84
|
}
|