@gen3/core 0.10.44 → 0.10.47

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/index.d.ts CHANGED
@@ -6,14 +6,12 @@ import React, { ComponentType } from 'react';
6
6
  import * as _reduxjs_toolkit_query from '@reduxjs/toolkit/query';
7
7
  import { FetchBaseQueryError, QueryStatus } from '@reduxjs/toolkit/query';
8
8
  import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
9
+ import * as redux_thunk from 'redux-thunk';
9
10
  import * as reselect from 'reselect';
10
11
  import * as _reduxjs_toolkit_dist_query_react_buildHooks from '@reduxjs/toolkit/dist/query/react/buildHooks';
11
12
  import * as _reduxjs_toolkit_dist_query from '@reduxjs/toolkit/dist/query';
12
13
  import { ReactReduxContextValue, TypedUseSelectorHook } from 'react-redux';
13
14
  import * as _reduxjs_toolkit_dist_query_endpointDefinitions from '@reduxjs/toolkit/dist/query/endpointDefinitions';
14
- import * as _reduxjs_toolkit_dist_query_apiTypes from '@reduxjs/toolkit/dist/query/apiTypes';
15
- import * as _reduxjs_toolkit_dist_query_baseQueryTypes from '@reduxjs/toolkit/dist/query/baseQueryTypes';
16
- import * as _reduxjs_toolkit_dist_query_fetchBaseQuery from '@reduxjs/toolkit/dist/query/fetchBaseQuery';
17
15
  import { Fetcher, SWRResponse } from 'swr';
18
16
 
19
17
  declare const GEN3_COMMONS_NAME: string;
@@ -332,41 +330,6 @@ type EntityType = 'case' | 'gene' | 'ssm' | 'cnv' | 'file';
332
330
  declare const selectGen3AppMetadataById: (state: CoreState, appId: string) => Gen3AppMetadata;
333
331
  declare const selectGen3AppById: (appId: string) => React.ReactNode;
334
332
 
335
- type UnknownJson = Record<string, unknown>;
336
- type DataStatus = 'uninitialized' | 'pending' | 'fulfilled' | 'rejected';
337
- interface Gen3Response<H = UnknownJson> {
338
- readonly data: H;
339
- readonly warnings?: Record<string, string>;
340
- readonly errors?: Record<string, string>;
341
- }
342
- interface UseCoreDataResponse<T> {
343
- readonly data?: T;
344
- readonly error?: string;
345
- readonly isUninitialized: boolean;
346
- readonly isFetching: boolean;
347
- readonly isSuccess: boolean;
348
- readonly isError: boolean;
349
- }
350
- interface CoreDataSelectorResponse<T, S = DataStatus> {
351
- readonly data?: T;
352
- readonly status: S;
353
- readonly error?: string;
354
- }
355
- interface CoreDataSelector<T> {
356
- (state: CoreState): CoreDataSelectorResponse<T>;
357
- }
358
- interface FetchDataActionCreator<P, A> {
359
- (...params: P[]): A;
360
- }
361
- interface UseCoreDataHook<P, T> {
362
- (...params: P[]): UseCoreDataResponse<T>;
363
- }
364
- declare const usePrevious: <T>(value: T) => T | undefined;
365
- declare const createUseCoreDataHook: <P, A, T>(fetchDataActionCreator: FetchDataActionCreator<P, A>, dataSelector: CoreDataSelector<T>) => UseCoreDataHook<P, T>;
366
- interface CoreDataValueSelector<T> {
367
- (state: CoreState): T;
368
- }
369
-
370
333
  interface ServiceAndMethod {
371
334
  method: string;
372
335
  service: string;
@@ -630,7 +593,7 @@ declare const coreStore: _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux
630
593
  data: Gen3FenceResponse<unknown>;
631
594
  }>, never, CSRFToken, "userAuthApi">;
632
595
  }, never, "userAuthApi">;
633
- }, redux.AnyAction, _reduxjs_toolkit.MiddlewareArray<[_reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
596
+ }, redux.AnyAction, _reduxjs_toolkit.MiddlewareArray<[redux_thunk.ThunkMiddleware<redux.CombinedState<{
634
597
  [x: string]: any;
635
598
  gen3Services: any;
636
599
  user: Gen3UserState;
@@ -661,9 +624,44 @@ declare const coreStore: _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux
661
624
  } | {
662
625
  data: Gen3FenceResponse<unknown>;
663
626
  }>, never, CSRFToken, "userAuthApi">;
664
- }, string, "userAuthApi">, _reduxjs_toolkit.ThunkDispatch<any, any, redux.AnyAction>>]>>;
627
+ }, string, "userAuthApi">, redux_thunk.ThunkDispatch<any, any, redux.AnyAction>>]>>;
665
628
  type CoreDispatch = typeof coreStore.dispatch;
666
629
 
630
+ type UnknownJson = Record<string, unknown>;
631
+ type DataStatus = 'uninitialized' | 'pending' | 'fulfilled' | 'rejected';
632
+ interface Gen3Response<H = UnknownJson> {
633
+ readonly data: H;
634
+ readonly warnings?: Record<string, string>;
635
+ readonly errors?: Record<string, string>;
636
+ }
637
+ interface UseCoreDataResponse<T> {
638
+ readonly data?: T;
639
+ readonly error?: string;
640
+ readonly isUninitialized: boolean;
641
+ readonly isFetching: boolean;
642
+ readonly isSuccess: boolean;
643
+ readonly isError: boolean;
644
+ }
645
+ interface CoreDataSelectorResponse<T, S = DataStatus> {
646
+ readonly data?: T;
647
+ readonly status: S;
648
+ readonly error?: string;
649
+ }
650
+ interface CoreDataSelector<T> {
651
+ (state: CoreState): CoreDataSelectorResponse<T>;
652
+ }
653
+ interface FetchDataActionCreator<P, A> {
654
+ (...params: P[]): A;
655
+ }
656
+ interface UseCoreDataHook<P, T> {
657
+ (...params: P[]): UseCoreDataResponse<T>;
658
+ }
659
+ declare const usePrevious: <T>(value: T) => T | undefined;
660
+ declare const createUseCoreDataHook: <P, A, T>(fetchDataActionCreator: FetchDataActionCreator<P, A>, dataSelector: CoreDataSelector<T>) => UseCoreDataHook<P, T>;
661
+ interface CoreDataValueSelector<T> {
662
+ (state: CoreState): T;
663
+ }
664
+
667
665
  interface Gen3UserLoginResponse<T> {
668
666
  readonly data?: T;
669
667
  readonly error?: string;
@@ -1244,7 +1242,7 @@ declare const useGraphQLQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQ
1244
1242
  * @param endpoints - Base API endpoints that should exist in every slice
1245
1243
  * @returns: The generated base API
1246
1244
  */
1247
- declare const gen3Api: _reduxjs_toolkit_dist_query_apiTypes.Api<_reduxjs_toolkit_dist_query_baseQueryTypes.BaseQueryFn<string | _reduxjs_toolkit_dist_query_fetchBaseQuery.FetchArgs, unknown, _reduxjs_toolkit_dist_query_fetchBaseQuery.FetchBaseQueryError, {}, _reduxjs_toolkit_dist_query_fetchBaseQuery.FetchBaseQueryMeta>, {}, "gen3Services", never, keyof _reduxjs_toolkit_dist_query_apiTypes.ApiModules<any, any, any, any>>;
1245
+ declare const gen3Api: _reduxjs_toolkit_dist_query.Api<_reduxjs_toolkit_dist_query.BaseQueryFn<string | _reduxjs_toolkit_dist_query.FetchArgs, unknown, _reduxjs_toolkit_dist_query.FetchBaseQueryError, {}, _reduxjs_toolkit_dist_query.FetchBaseQueryMeta>, {}, "gen3Services", never, keyof _reduxjs_toolkit_dist_query.ApiModules<any, any, any, any>>;
1248
1246
 
1249
1247
  type DRSHostnameMap = Record<string, string>;
1250
1248
  declare const drsHostnamesReducer: redux.Reducer<Record<string, string>>;
@@ -1601,4 +1599,4 @@ declare const useLazyGetSubmissionGraphQLQuery: _reduxjs_toolkit_dist_query_reac
1601
1599
  declare const useGetSubmissionsQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, never, SubmissionQueryResponse, "gen3Services">>;
1602
1600
  declare const useGetDictionaryQuery: _reduxjs_toolkit_dist_query_react_buildHooks.UseQuery<_reduxjs_toolkit_query.QueryDefinition<void, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, never, SubmissionGraphqlResponse, "gen3Services">>;
1603
1601
 
1604
- export { APIKey, Accessibility, AggregationResponse, AggregationsData, AiSearchResponse, AllowableRange, AuthzMapping, BaseGuppyDataRequest, CSRFToken, Comparison, CoreContext, CoreDataSelector, CoreDataSelectorResponse, CoreDataValueSelector, CoreDispatch, CoreProvider, CoreState, CrosswalkEntry, CrosswalkInfo, DataStatus, DownloadFromGuppyParams, EnumFilterValue, Equals, ExcludeIfAny, Excludes, Exists, ExternalProvider, FacetBucket, FacetDefinition, FacetType, FetchDataActionCreator, FetchError, FetchRequest, FilterSet, FilterValue, GEN3_API, GEN3_AUTHZ_API, GEN3_COMMONS_NAME, GEN3_CROSSWALK_API, GEN3_DOMAIN, GEN3_DOWNLOADS_ENDPOINT, GEN3_FENCE_API, GEN3_GUPPY_API, GEN3_MDS_API, GEN3_REDIRECT_URL, GEN3_SUBMISSION_API, GEN3_WORKSPACE_STATUS_API, GQLFilter, Gen3FenceCredentials, Gen3FenceResponse, Gen3LoginProvider, Gen3Response, Gen3User, GraphQLQuery, GreaterThan, GreaterThanOrEquals, GuppyActionFunction, GuppyActionFunctionParams, GuppyActionParams, GuppyAggregationData, GuppyDownloadActionFunctionParams, GuppyDownloadDataParams, HistogramBucket, HistogramData, HistogramDataArray, HistogramDataCollection, Includes, IndexedFilterSet, IndexedMetadataFilters, Intersection, JSONArray, JSONObject, JSONValue, JWTSessionStatus, LessThan, LessThanOrEquals, LoginStatus, MetadataPaginationParams, MetadataRequestParams, MetadataResponse, Missing, Modals, NameUrl, NamedURL, NestedFilter, NotEquals, Operation, OperationHandler, OperationWithField, Project, ProjectDetailsParams, ProjectDetailsQueryResponse, ProjectDetailsResponse, ProjectResponse, ProjectsListRequestParams, RangeFilterValue, RawDataAndTotalCountsParams, ServiceAndMethod, SetFilterValue, SortOption, SubmissionDocument, SubmissionGraphqlParams, SubmissionGraphqlResponse, SubmissionInfo, TablePageOffsetProps, Union, UnknownJson, UseCoreDataHook, UseCoreDataResponse, UserProfile, clearCohortFilters, cohortReducer, convertFilterSetToGqlFilter, coreStore, createGen3App, createUseCoreDataHook, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, drsHostnamesReducer, extractEnumFilterValue, extractFieldNameFromFullFieldName, extractFilterValue, extractIndexAndFieldNameFromFullFieldName, extractIndexFromFullFieldName, fetchFence, fetchJson, fetchUserState, fieldNameToTitle, gen3Api, getGen3AppId, graphQLAPI, graphQLWithTags, guppyAPISliceMiddleware, guppyApi, guppyApiReducer, guppyApiResponse, guppyApiSliceReducerPath, guppyApiSliceRequest, guppyFetchError, handleOperation, hideModal, isAuthenticated, isErrorWithMessage, isFetchBaseQueryError, isFetchParseError, isFilterEmpty, isGuppyAggregationData, isHistogramData, isHistogramDataAArray, isHistogramDataAnEnum, isHistogramDataArray, isHistogramDataArrayARange, isHistogramDataArrayAnEnum, isHistogramDataCollection, isHistogramRangeData, isJSONObject, isJSONValue, isJSONValueArray, isOperationWithField, isPending, isProgramUrl, isRootUrl, listifyMethodsFromMapping, logoutFence, prependIndexToFieldName, projectCodeFromResourcePath, rawDataQueryStrForEachField, removeCohortFilter, resetUserState, resourcePathFromProjectID, selectAggDataForIndex, selectAuthzMappingData, selectCSRFToken, selectCSRFTokenData, selectCohortFilters, selectCurrentCohort, selectCurrentCohortId, selectCurrentCohortName, selectCurrentMessage, selectCurrentModal, selectGen3AppById, selectGen3AppMetadataById, selectHeadersWithCSRFToken, selectIndexFilters, selectIndexedFilterByName, selectUser, selectUserAuthStatus, selectUserData, selectUserDetails, selectUserLoginStatus, setDRSHostnames, showModal, submissionApi, trimFirstFieldNameToTitle, updateCohortFilter, useAddNewCredentialMutation, useAskQuestionMutation, useAuthorizeFromCredentialsMutation, useCoreDispatch, useCoreSelector, useCoreStore, useDownloadFromGuppyMutation, useFetchUserDetailsQuery, useGeneralGQLQuery, useGetAISearchStatusQuery, useGetAISearchVersionQuery, useGetAccessibleDataQuery, useGetAggMDSQuery, useGetAggsQuery, useGetAllFieldsForTypeQuery, useGetArrayTypes, useGetAuthzMappingsQuery, useGetCSRFQuery, useGetCountsQuery, useGetCredentialsQuery, useGetCrosswalkDataQuery, useGetDataQuery, useGetDictionaryQuery, useGetExternalLoginsQuery, useGetFieldCountSummaryQuery, useGetFieldsForIndexQuery, useGetIndexAggMDSQuery, useGetIndexFields, useGetJWKKeysQuery, useGetLoginProvidersQuery, useGetMDSQuery, useGetProjectsDetailsQuery, useGetProjectsQuery, useGetRawDataAndTotalCountsQuery, useGetStatus, useGetSubAggsQuery, useGetSubmissionGraphQLQuery, useGetSubmissionsQuery, useGetTagsQuery, useGetWorkspaceOptionsQuery, useGetWorkspacePayModelsQuery, useGetWorkspaceStatusQuery, useGraphQLQuery, useIsExternalConnectedQuery, useIsUserLoggedIn, useLazyFetchUserDetailsQuery, useLazyGeneralGQLQuery, useLazyGetCrosswalkDataQuery, useLazyGetExternalLoginsQuery, useLazyGetProjectsQuery, useLazyGetSubmissionGraphQLQuery, useLazyIsExternalConnectedQuery, usePrevious, useRemoveCredentialMutation, useUser, useUserAuth, userHasCreateOrUpdateOnAnyProject, userHasDataUpload, userHasMethodForServiceOnProject, userHasMethodForServiceOnResource, userHasMethodOnAnyProject, userHasSheepdogProgramAdmin, userHasSheepdogProjectAdmin };
1602
+ export { type APIKey, Accessibility, type AggregationResponse, type AggregationsData, type AiSearchResponse, type AllowableRange, type AuthzMapping, type BaseGuppyDataRequest, type CSRFToken, type Comparison, CoreContext, type CoreDataSelector, type CoreDataSelectorResponse, type CoreDataValueSelector, type CoreDispatch, CoreProvider, type CoreState, type CrosswalkEntry, type CrosswalkInfo, type DataStatus, type DownloadFromGuppyParams, type EnumFilterValue, type Equals, type ExcludeIfAny, type Excludes, type Exists, type ExternalProvider, type FacetBucket, type FacetDefinition, type FacetType, type FetchDataActionCreator, type FetchError, type FetchRequest, type FilterSet, type FilterValue, GEN3_API, GEN3_AUTHZ_API, GEN3_COMMONS_NAME, GEN3_CROSSWALK_API, GEN3_DOMAIN, GEN3_DOWNLOADS_ENDPOINT, GEN3_FENCE_API, GEN3_GUPPY_API, GEN3_MDS_API, GEN3_REDIRECT_URL, GEN3_SUBMISSION_API, GEN3_WORKSPACE_STATUS_API, type GQLFilter, type Gen3FenceCredentials, type Gen3FenceResponse, type Gen3LoginProvider, type Gen3Response, type Gen3User, type GraphQLQuery, type GreaterThan, type GreaterThanOrEquals, type GuppyActionFunction, type GuppyActionFunctionParams, type GuppyActionParams, type GuppyAggregationData, type GuppyDownloadActionFunctionParams, type GuppyDownloadDataParams, type HistogramBucket, type HistogramData, type HistogramDataArray, type HistogramDataCollection, type Includes, type IndexedFilterSet, type IndexedMetadataFilters, type Intersection, type JSONArray, type JSONObject, type JSONValue, type JWTSessionStatus, type LessThan, type LessThanOrEquals, type LoginStatus, type MetadataPaginationParams, type MetadataRequestParams, type MetadataResponse, type Missing, Modals, type NameUrl, type NamedURL, type NestedFilter, type NotEquals, type Operation, type OperationHandler, type OperationWithField, type Project, type ProjectDetailsParams, type ProjectDetailsQueryResponse, type ProjectDetailsResponse, type ProjectResponse, type ProjectsListRequestParams, type RangeFilterValue, type RawDataAndTotalCountsParams, type ServiceAndMethod, type SetFilterValue, type SortOption, type SubmissionDocument, type SubmissionGraphqlParams, type SubmissionGraphqlResponse, type SubmissionInfo, type TablePageOffsetProps, type Union, type UnknownJson, type UseCoreDataHook, type UseCoreDataResponse, type UserProfile, clearCohortFilters, cohortReducer, convertFilterSetToGqlFilter, coreStore, createGen3App, createUseCoreDataHook, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, drsHostnamesReducer, extractEnumFilterValue, extractFieldNameFromFullFieldName, extractFilterValue, extractIndexAndFieldNameFromFullFieldName, extractIndexFromFullFieldName, fetchFence, fetchJson, fetchUserState, fieldNameToTitle, gen3Api, getGen3AppId, graphQLAPI, graphQLWithTags, guppyAPISliceMiddleware, guppyApi, guppyApiReducer, type guppyApiResponse, guppyApiSliceReducerPath, type guppyApiSliceRequest, type guppyFetchError, handleOperation, hideModal, isAuthenticated, isErrorWithMessage, isFetchBaseQueryError, isFetchParseError, isFilterEmpty, isGuppyAggregationData, isHistogramData, isHistogramDataAArray, isHistogramDataAnEnum, isHistogramDataArray, isHistogramDataArrayARange, isHistogramDataArrayAnEnum, isHistogramDataCollection, isHistogramRangeData, isJSONObject, isJSONValue, isJSONValueArray, isOperationWithField, isPending, isProgramUrl, isRootUrl, listifyMethodsFromMapping, logoutFence, prependIndexToFieldName, projectCodeFromResourcePath, rawDataQueryStrForEachField, removeCohortFilter, resetUserState, resourcePathFromProjectID, selectAggDataForIndex, selectAuthzMappingData, selectCSRFToken, selectCSRFTokenData, selectCohortFilters, selectCurrentCohort, selectCurrentCohortId, selectCurrentCohortName, selectCurrentMessage, selectCurrentModal, selectGen3AppById, selectGen3AppMetadataById, selectHeadersWithCSRFToken, selectIndexFilters, selectIndexedFilterByName, selectUser, selectUserAuthStatus, selectUserData, selectUserDetails, selectUserLoginStatus, setDRSHostnames, showModal, submissionApi, trimFirstFieldNameToTitle, updateCohortFilter, useAddNewCredentialMutation, useAskQuestionMutation, useAuthorizeFromCredentialsMutation, useCoreDispatch, useCoreSelector, useCoreStore, useDownloadFromGuppyMutation, useFetchUserDetailsQuery, useGeneralGQLQuery, useGetAISearchStatusQuery, useGetAISearchVersionQuery, useGetAccessibleDataQuery, useGetAggMDSQuery, useGetAggsQuery, useGetAllFieldsForTypeQuery, useGetArrayTypes, useGetAuthzMappingsQuery, useGetCSRFQuery, useGetCountsQuery, useGetCredentialsQuery, useGetCrosswalkDataQuery, useGetDataQuery, useGetDictionaryQuery, useGetExternalLoginsQuery, useGetFieldCountSummaryQuery, useGetFieldsForIndexQuery, useGetIndexAggMDSQuery, useGetIndexFields, useGetJWKKeysQuery, useGetLoginProvidersQuery, useGetMDSQuery, useGetProjectsDetailsQuery, useGetProjectsQuery, useGetRawDataAndTotalCountsQuery, useGetStatus, useGetSubAggsQuery, useGetSubmissionGraphQLQuery, useGetSubmissionsQuery, useGetTagsQuery, useGetWorkspaceOptionsQuery, useGetWorkspacePayModelsQuery, useGetWorkspaceStatusQuery, useGraphQLQuery, useIsExternalConnectedQuery, useIsUserLoggedIn, useLazyFetchUserDetailsQuery, useLazyGeneralGQLQuery, useLazyGetCrosswalkDataQuery, useLazyGetExternalLoginsQuery, useLazyGetProjectsQuery, useLazyGetSubmissionGraphQLQuery, useLazyIsExternalConnectedQuery, usePrevious, useRemoveCredentialMutation, useUser, useUserAuth, userHasCreateOrUpdateOnAnyProject, userHasDataUpload, userHasMethodForServiceOnProject, userHasMethodForServiceOnResource, userHasMethodOnAnyProject, userHasSheepdogProgramAdmin, userHasSheepdogProjectAdmin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gen3/core",
3
- "version": "0.10.44",
3
+ "version": "0.10.47",
4
4
  "author": "CTDS",
5
5
  "description": "Core module for gen3 frontend. Provides an interface for interacting with the gen3 API and a redux store for managing state.",
6
6
  "license": "Apache-2.0",
@@ -26,7 +26,7 @@
26
26
  "scripts": {
27
27
  "lint": "eslint .",
28
28
  "compile": "tsc",
29
- "clean": "rimraf dist",
29
+ "clean": "rm -rf dist",
30
30
  "types": "tsc --emitDeclarationOnly",
31
31
  "build": "npm run clean && npm run compile && rollup --config rollup.config.mjs",
32
32
  "build:clean": "npm run clean && npm run compile && npm run types && rollup --config rollup.config.mjs",
@@ -48,7 +48,6 @@
48
48
  "@types/fastestsmallesttextencoderdecoder": "^1.0.2",
49
49
  "@types/flat": "^5.0.3",
50
50
  "@types/isomorphic-fetch": "^0.0.36",
51
- "@types/jest": "^29.5.12",
52
51
  "@types/jsonpath-plus": "5.0.5",
53
52
  "@types/lodash": "^4.14.191",
54
53
  "@types/papaparse": "^5.3.14",
@@ -61,10 +60,10 @@
61
60
  "queue": "6.0.2",
62
61
  "react-redux": "^8.1.0",
63
62
  "redux-persist": "^6.0.0",
63
+ "swr": "^2.2.5",
64
64
  "uuid": "^9.0.1"
65
65
  },
66
66
  "files": [
67
67
  "dist"
68
- ],
69
- "gitHead": "4fa5483ea0d4d9d1e7b861ce0763490afd799e26"
68
+ ]
70
69
  }