@gen3/core 0.10.44
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 +2243 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/dts/api.d.ts +8 -0
- package/dist/dts/constants.d.ts +32 -0
- package/dist/dts/dataAccess.d.ts +35 -0
- package/dist/dts/features/aiSearch/aiSearchSlice.d.ts +38 -0
- package/dist/dts/features/aiSearch/index.d.ts +2 -0
- package/dist/dts/features/app/store.d.ts +6 -0
- package/dist/dts/features/authz/authzMappingSlice.d.ts +141 -0
- package/dist/dts/features/authz/index.d.ts +3 -0
- package/dist/dts/features/authz/types.d.ts +5 -0
- package/dist/dts/features/cohort/cohortBuilderConfigSlice.d.ts +0 -0
- package/dist/dts/features/cohort/cohortSlice.d.ts +95 -0
- package/dist/dts/features/cohort/index.d.ts +2 -0
- package/dist/dts/features/cohort/types.d.ts +0 -0
- package/dist/dts/features/download/constants.d.ts +14 -0
- package/dist/dts/features/download/downloadStatusApi.d.ts +19 -0
- package/dist/dts/features/download/index.d.ts +2 -0
- package/dist/dts/features/download/types.d.ts +20 -0
- package/dist/dts/features/drsResolver/drsHostnameSlice.d.ts +5 -0
- package/dist/dts/features/drsResolver/index.d.ts +2 -0
- package/dist/dts/features/drsResolver/resolvers/cachedDRSResolver.d.ts +1 -0
- package/dist/dts/features/drsResolver/resolvers/dataGUIDSDotOrg.d.ts +6 -0
- package/dist/dts/features/drsResolver/resolvers/tests/dataGUIDSDotOrg.unit.test.d.ts +1 -0
- package/dist/dts/features/drsResolver/types.d.ts +0 -0
- package/dist/dts/features/drsResolver/utils.d.ts +6 -0
- package/dist/dts/features/fence/credentialsApi.d.ts +35 -0
- package/dist/dts/features/fence/fenceApi.d.ts +37 -0
- package/dist/dts/features/fence/index.d.ts +6 -0
- package/dist/dts/features/fence/jwtApi.d.ts +12 -0
- package/dist/dts/features/fence/types.d.ts +12 -0
- package/dist/dts/features/fence/utils.d.ts +12 -0
- package/dist/dts/features/filters/filters.d.ts +122 -0
- package/dist/dts/features/filters/index.d.ts +4 -0
- package/dist/dts/features/filters/tests/utils.unit.test.d.ts +1 -0
- package/dist/dts/features/filters/types.d.ts +113 -0
- package/dist/dts/features/filters/utils.d.ts +26 -0
- package/dist/dts/features/gen3/gen3Api.d.ts +11 -0
- package/dist/dts/features/gen3/index.d.ts +2 -0
- package/dist/dts/features/gen3Apps/Gen3App.d.ts +48 -0
- package/dist/dts/features/gen3Apps/gen3AppRegistry.d.ts +7 -0
- package/dist/dts/features/gen3Apps/gen3AppsSlice.d.ts +19 -0
- package/dist/dts/features/gen3Apps/index.d.ts +3 -0
- package/dist/dts/features/graphQL/graphQLSlice.d.ts +12 -0
- package/dist/dts/features/graphQL/index.d.ts +1 -0
- package/dist/dts/features/guppy/conversion.d.ts +23 -0
- package/dist/dts/features/guppy/guppyApi.d.ts +41 -0
- package/dist/dts/features/guppy/guppyDownloadSlice.d.ts +21 -0
- package/dist/dts/features/guppy/guppySlice.d.ts +120 -0
- package/dist/dts/features/guppy/index.d.ts +6 -0
- package/dist/dts/features/guppy/tests/downloadFromGuppy.unit.test.d.ts +1 -0
- package/dist/dts/features/guppy/types.d.ts +33 -0
- package/dist/dts/features/guppy/utils.d.ts +28 -0
- package/dist/dts/features/metadata/index.d.ts +3 -0
- package/dist/dts/features/metadata/metadataSlice.d.ts +56 -0
- package/dist/dts/features/metadata/types.d.ts +12 -0
- package/dist/dts/features/modals/index.d.ts +2 -0
- package/dist/dts/features/modals/modalsSlice.d.ts +26 -0
- package/dist/dts/features/submission/authMappingUtils.d.ts +15 -0
- package/dist/dts/features/submission/index.d.ts +3 -0
- package/dist/dts/features/submission/submissionApi.d.ts +43 -0
- package/dist/dts/features/submission/types.d.ts +46 -0
- package/dist/dts/features/user/externalLoginsSlice.d.ts +14 -0
- package/dist/dts/features/user/hooks.d.ts +18 -0
- package/dist/dts/features/user/index.d.ts +5 -0
- package/dist/dts/features/user/test/useGetExternalLoginsQuery.unit.test.d.ts +1 -0
- package/dist/dts/features/user/types.d.ts +50 -0
- package/dist/dts/features/user/userSlice.d.ts +53 -0
- package/dist/dts/features/user/userSliceRTK.d.ts +484 -0
- package/dist/dts/features/workspace/index.d.ts +2 -0
- package/dist/dts/features/workspace/types.d.ts +0 -0
- package/dist/dts/features/workspace/workspacesSlice.d.ts +6 -0
- package/dist/dts/hooks.d.ts +36 -0
- package/dist/dts/index.d.ts +23 -0
- package/dist/dts/provider.d.ts +2 -0
- package/dist/dts/reducers.d.ts +22 -0
- package/dist/dts/store.d.ts +53 -0
- package/dist/dts/store.unit.test.d.ts +2 -0
- package/dist/dts/types/index.d.ts +51 -0
- package/dist/dts/utils/extractvalues.d.ts +9 -0
- package/dist/dts/utils/index.d.ts +2 -0
- package/dist/dts/utils/ts-utils.d.ts +4 -0
- package/dist/esm/index.js +2083 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +1604 -0
- package/package.json +70 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { type AuthzMapping } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates the authzApi for checking arborist permissions for a selected user
|
|
4
|
+
* @see https://petstore.swagger.io/?url=https://raw.githubusercontent.com/uc-cdis/arborist/master/docs/openapi.yaml#/auth/get_auth_mapping
|
|
5
|
+
* @see https://github.com/uc-cdis/arborist/blob/master/docs/relationships.simplified.png
|
|
6
|
+
* @returns: An arborist response dict of user permissions {method, service} for each resource path.
|
|
7
|
+
*/
|
|
8
|
+
export declare const authzApi: import("@reduxjs/toolkit/dist/query").Api<import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, {
|
|
9
|
+
getAuthzMappings: import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, never, AuthzMapping, "gen3Services">;
|
|
10
|
+
}, "gen3Services", never, keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>;
|
|
11
|
+
export declare const useGetAuthzMappingsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, never, AuthzMapping, "gen3Services">>;
|
|
12
|
+
export declare const selectAuthzMapping: (state: import("@reduxjs/toolkit/dist/query/core/apiState").RootState<{
|
|
13
|
+
getAuthzMappings: import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, never, AuthzMapping, "gen3Services">;
|
|
14
|
+
}, never, "gen3Services">) => ({
|
|
15
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.uninitialized;
|
|
16
|
+
originalArgs?: undefined;
|
|
17
|
+
data?: undefined;
|
|
18
|
+
error?: undefined;
|
|
19
|
+
requestId?: undefined;
|
|
20
|
+
endpointName?: string | undefined;
|
|
21
|
+
startedTimeStamp?: undefined;
|
|
22
|
+
fulfilledTimeStamp?: undefined;
|
|
23
|
+
} & {
|
|
24
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.uninitialized;
|
|
25
|
+
isUninitialized: true;
|
|
26
|
+
isLoading: false;
|
|
27
|
+
isSuccess: false;
|
|
28
|
+
isError: false;
|
|
29
|
+
}) | ({
|
|
30
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.fulfilled;
|
|
31
|
+
error: undefined;
|
|
32
|
+
requestId: string;
|
|
33
|
+
originalArgs: void;
|
|
34
|
+
endpointName: string;
|
|
35
|
+
startedTimeStamp: number;
|
|
36
|
+
data: AuthzMapping;
|
|
37
|
+
fulfilledTimeStamp: number;
|
|
38
|
+
} & {
|
|
39
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.fulfilled;
|
|
40
|
+
isUninitialized: false;
|
|
41
|
+
isLoading: false;
|
|
42
|
+
isSuccess: true;
|
|
43
|
+
isError: false;
|
|
44
|
+
}) | ({
|
|
45
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.pending;
|
|
46
|
+
originalArgs: void;
|
|
47
|
+
requestId: string;
|
|
48
|
+
data?: AuthzMapping | undefined;
|
|
49
|
+
error?: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/dist/query").FetchBaseQueryError | undefined;
|
|
50
|
+
endpointName: string;
|
|
51
|
+
startedTimeStamp: number;
|
|
52
|
+
fulfilledTimeStamp?: number | undefined;
|
|
53
|
+
} & {
|
|
54
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.pending;
|
|
55
|
+
isUninitialized: false;
|
|
56
|
+
isLoading: true;
|
|
57
|
+
isSuccess: false;
|
|
58
|
+
isError: false;
|
|
59
|
+
}) | ({
|
|
60
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.rejected;
|
|
61
|
+
data?: AuthzMapping | undefined;
|
|
62
|
+
requestId: string;
|
|
63
|
+
fulfilledTimeStamp?: number | undefined;
|
|
64
|
+
originalArgs: void;
|
|
65
|
+
endpointName: string;
|
|
66
|
+
startedTimeStamp: number;
|
|
67
|
+
error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/dist/query").FetchBaseQueryError;
|
|
68
|
+
} & {
|
|
69
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.rejected;
|
|
70
|
+
isUninitialized: false;
|
|
71
|
+
isLoading: false;
|
|
72
|
+
isSuccess: false;
|
|
73
|
+
isError: true;
|
|
74
|
+
});
|
|
75
|
+
export declare const selectAuthzMappingData: ((state: import("@reduxjs/toolkit/dist/query/core/apiState").RootState<{
|
|
76
|
+
getAuthzMappings: import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, never, AuthzMapping, "gen3Services">;
|
|
77
|
+
}, never, "gen3Services">) => AuthzMapping) & import("reselect").OutputSelectorFields<(args_0: ({
|
|
78
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.uninitialized;
|
|
79
|
+
originalArgs?: undefined;
|
|
80
|
+
data?: undefined;
|
|
81
|
+
error?: undefined;
|
|
82
|
+
requestId?: undefined;
|
|
83
|
+
endpointName?: string | undefined;
|
|
84
|
+
startedTimeStamp?: undefined;
|
|
85
|
+
fulfilledTimeStamp?: undefined;
|
|
86
|
+
} & {
|
|
87
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.uninitialized;
|
|
88
|
+
isUninitialized: true;
|
|
89
|
+
isLoading: false;
|
|
90
|
+
isSuccess: false;
|
|
91
|
+
isError: false;
|
|
92
|
+
}) | ({
|
|
93
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.fulfilled;
|
|
94
|
+
error: undefined;
|
|
95
|
+
requestId: string;
|
|
96
|
+
originalArgs: void;
|
|
97
|
+
endpointName: string;
|
|
98
|
+
startedTimeStamp: number;
|
|
99
|
+
data: AuthzMapping;
|
|
100
|
+
fulfilledTimeStamp: number;
|
|
101
|
+
} & {
|
|
102
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.fulfilled;
|
|
103
|
+
isUninitialized: false;
|
|
104
|
+
isLoading: false;
|
|
105
|
+
isSuccess: true;
|
|
106
|
+
isError: false;
|
|
107
|
+
}) | ({
|
|
108
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.pending;
|
|
109
|
+
originalArgs: void;
|
|
110
|
+
requestId: string;
|
|
111
|
+
data?: AuthzMapping | undefined;
|
|
112
|
+
error?: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/dist/query").FetchBaseQueryError | undefined;
|
|
113
|
+
endpointName: string;
|
|
114
|
+
startedTimeStamp: number;
|
|
115
|
+
fulfilledTimeStamp?: number | undefined;
|
|
116
|
+
} & {
|
|
117
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.pending;
|
|
118
|
+
isUninitialized: false;
|
|
119
|
+
isLoading: true;
|
|
120
|
+
isSuccess: false;
|
|
121
|
+
isError: false;
|
|
122
|
+
}) | ({
|
|
123
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.rejected;
|
|
124
|
+
data?: AuthzMapping | undefined;
|
|
125
|
+
requestId: string;
|
|
126
|
+
fulfilledTimeStamp?: number | undefined;
|
|
127
|
+
originalArgs: void;
|
|
128
|
+
endpointName: string;
|
|
129
|
+
startedTimeStamp: number;
|
|
130
|
+
error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/dist/query").FetchBaseQueryError;
|
|
131
|
+
} & {
|
|
132
|
+
status: import("@reduxjs/toolkit/dist/query").QueryStatus.rejected;
|
|
133
|
+
isUninitialized: false;
|
|
134
|
+
isLoading: false;
|
|
135
|
+
isSuccess: false;
|
|
136
|
+
isError: true;
|
|
137
|
+
})) => AuthzMapping, {
|
|
138
|
+
clearCache: () => void;
|
|
139
|
+
}> & {
|
|
140
|
+
clearCache: () => void;
|
|
141
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Draft, type PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { CoreState } from '../../reducers';
|
|
3
|
+
import { Operation, FilterSet, IndexedFilterSet } from '../filters';
|
|
4
|
+
export interface Cohort {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly filters: IndexedFilterSet;
|
|
8
|
+
readonly modified?: boolean;
|
|
9
|
+
readonly modified_datetime: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CohortState {
|
|
12
|
+
cohort: Cohort;
|
|
13
|
+
}
|
|
14
|
+
interface UpdateFilterParams {
|
|
15
|
+
index: string;
|
|
16
|
+
field: string;
|
|
17
|
+
filter: Operation;
|
|
18
|
+
}
|
|
19
|
+
interface RemoveFilterParams {
|
|
20
|
+
index: string;
|
|
21
|
+
field: string;
|
|
22
|
+
}
|
|
23
|
+
interface ClearAllFilterParams {
|
|
24
|
+
index: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Redux slice for cohort filters
|
|
28
|
+
*/
|
|
29
|
+
export declare const cohortSlice: import("@reduxjs/toolkit").Slice<CohortState, {
|
|
30
|
+
updateCohortFilter: (state: Draft<CohortState>, action: PayloadAction<UpdateFilterParams>) => {
|
|
31
|
+
cohort: {
|
|
32
|
+
filters: {
|
|
33
|
+
[x: string]: import("immer/dist/internal.js").WritableDraft<FilterSet> | {
|
|
34
|
+
mode: "and" | "or";
|
|
35
|
+
root: {
|
|
36
|
+
[x: string]: Operation | import("immer/dist/internal.js").WritableDraft<import("../filters").Intersection> | import("immer/dist/internal.js").WritableDraft<import("../filters").Union> | import("immer/dist/internal.js").WritableDraft<import("../filters").Includes> | import("immer/dist/internal.js").WritableDraft<import("../filters").Equals> | import("immer/dist/internal.js").WritableDraft<import("../filters").NotEquals> | import("immer/dist/internal.js").WritableDraft<import("../filters").LessThan> | import("immer/dist/internal.js").WritableDraft<import("../filters").LessThanOrEquals> | import("immer/dist/internal.js").WritableDraft<import("../filters").GreaterThan> | import("immer/dist/internal.js").WritableDraft<import("../filters").GreaterThanOrEquals> | import("immer/dist/internal.js").WritableDraft<import("../filters").NestedFilter> | import("immer/dist/internal.js").WritableDraft<import("../filters").ExcludeIfAny> | import("immer/dist/internal.js").WritableDraft<import("../filters").Excludes>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
modified?: boolean | undefined;
|
|
43
|
+
modified_datetime: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
removeCohortFilter: (state: Draft<CohortState>, action: PayloadAction<RemoveFilterParams>) => {
|
|
47
|
+
cohort: {
|
|
48
|
+
filters: {
|
|
49
|
+
[x: string]: import("immer/dist/internal.js").WritableDraft<FilterSet> | {
|
|
50
|
+
mode: "and" | "or";
|
|
51
|
+
root: {
|
|
52
|
+
[x: string]: import("immer/dist/internal.js").WritableDraft<import("../filters").Intersection> | import("immer/dist/internal.js").WritableDraft<import("../filters").Union> | import("immer/dist/internal.js").WritableDraft<import("../filters").Includes> | import("immer/dist/internal.js").WritableDraft<import("../filters").Equals> | import("immer/dist/internal.js").WritableDraft<import("../filters").NotEquals> | import("immer/dist/internal.js").WritableDraft<import("../filters").LessThan> | import("immer/dist/internal.js").WritableDraft<import("../filters").LessThanOrEquals> | import("immer/dist/internal.js").WritableDraft<import("../filters").GreaterThan> | import("immer/dist/internal.js").WritableDraft<import("../filters").GreaterThanOrEquals> | import("immer/dist/internal.js").WritableDraft<import("../filters").NestedFilter> | import("immer/dist/internal.js").WritableDraft<import("../filters").ExcludeIfAny> | import("immer/dist/internal.js").WritableDraft<import("../filters").Excludes>;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
modified?: boolean | undefined;
|
|
59
|
+
modified_datetime: string;
|
|
60
|
+
};
|
|
61
|
+
} | undefined;
|
|
62
|
+
clearCohortFilters: (state: Draft<CohortState>, action: PayloadAction<ClearAllFilterParams>) => {
|
|
63
|
+
cohort: {
|
|
64
|
+
filters: {
|
|
65
|
+
[x: string]: FilterSet | import("immer/dist/internal.js").WritableDraft<FilterSet>;
|
|
66
|
+
};
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
modified?: boolean | undefined;
|
|
70
|
+
modified_datetime: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}, "cohort">;
|
|
74
|
+
export declare const updateCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateFilterParams, "cohort/updateCohortFilter">, removeCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<RemoveFilterParams, "cohort/removeCohortFilter">, clearCohortFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClearAllFilterParams, "cohort/clearCohortFilters">;
|
|
75
|
+
export declare const selectCohortFilters: (state: CoreState) => IndexedFilterSet;
|
|
76
|
+
export declare const selectCurrentCohortId: (state: CoreState) => string;
|
|
77
|
+
export declare const selectCurrentCohort: (state: CoreState) => Cohort;
|
|
78
|
+
export declare const selectCurrentCohortName: (state: CoreState) => string;
|
|
79
|
+
/**
|
|
80
|
+
* Select a filter by its name from the current cohort. If the filter is not found
|
|
81
|
+
* returns undefined.
|
|
82
|
+
* @param state - Core
|
|
83
|
+
* @param index which cohort index to select from
|
|
84
|
+
* @param name name of the filter to select
|
|
85
|
+
*/
|
|
86
|
+
export declare const selectIndexedFilterByName: (state: CoreState, index: string, name: string) => Operation | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Select a filter from the index.
|
|
89
|
+
* returns undefined.
|
|
90
|
+
* @param state - Core
|
|
91
|
+
* @param index which cohort index to select from
|
|
92
|
+
*/
|
|
93
|
+
export declare const selectIndexFilters: (state: CoreState, index: string) => FilterSet;
|
|
94
|
+
export declare const cohortReducer: import("redux").Reducer<CohortState>;
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { cohortReducer, selectCohortFilters, selectIndexFilters, selectIndexedFilterByName, selectCurrentCohortId, selectCurrentCohortName, selectCurrentCohort, updateCohortFilter, removeCohortFilter, clearCohortFilters } from './cohortSlice';
|
|
2
|
+
export { selectCohortFilters, selectIndexFilters, selectIndexedFilterByName, selectCurrentCohortId, selectCurrentCohortName, selectCurrentCohort, cohortReducer, updateCohortFilter, removeCohortFilter, clearCohortFilters, };
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const BATCH_EXPORT_JOB_PREFIX = "batch-export";
|
|
2
|
+
export declare const GUID_PREFIX_PATTERN: RegExp;
|
|
3
|
+
export declare const DOWNLOAD_UNAUTHORIZED_MESSAGE = "Unable to authorize download. Please refresh the page and ensure you are logged in.";
|
|
4
|
+
export declare const DOWNLOAD_STARTED_MESSAGE: string;
|
|
5
|
+
export declare const DOWNLOAD_SUCCEEDED_MESSAGE = "Your download has been prepared. If your download doesn't start automatically, please follow this direct link:";
|
|
6
|
+
export declare const JOB_POLLING_INTERVAL = 5000;
|
|
7
|
+
export declare const DOWNLOAD_FAIL_STATUS: {
|
|
8
|
+
inProgress: boolean;
|
|
9
|
+
message: {
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
active: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DownloadStatus, JobStatus } from './types';
|
|
2
|
+
import { FetchArgs } from '@reduxjs/toolkit/query/react';
|
|
3
|
+
export interface DownloadStatusResponse {
|
|
4
|
+
downloadStatus: DownloadStatus;
|
|
5
|
+
}
|
|
6
|
+
type JobListResponse = Array<JobStatus>;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a loadingStatusApi for checking the status of a sower data download job
|
|
9
|
+
* @param getJobList Shows the list of jobs currently running
|
|
10
|
+
* @see https://petstore.swagger.io/?url=https://raw.githubusercontent.com/uc-cdis/sower/master/openapis/openapi.yaml#/sower/list
|
|
11
|
+
* @param getDownloadStatus Shows the status of a selected job
|
|
12
|
+
* @returns: A sower job response dict which returns job information of file downloads
|
|
13
|
+
*/
|
|
14
|
+
export declare const loadingStatusApi: import("@reduxjs/toolkit/query/react").Api<import("@reduxjs/toolkit/query/react").BaseQueryFn<string | FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, {
|
|
15
|
+
getJobList: import("@reduxjs/toolkit/query/react").QueryDefinition<void, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, JobListResponse, "gen3Services">;
|
|
16
|
+
getDownloadStatus: import("@reduxjs/toolkit/query/react").QueryDefinition<string | FetchArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, DownloadStatus, "gen3Services">;
|
|
17
|
+
}, "gen3Services", never, keyof import("@reduxjs/toolkit/query/react").ApiModules<any, any, any, any>>;
|
|
18
|
+
export declare const useGetJobListQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<void, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, JobListResponse, "gen3Services">>, useGetDownloadStatusQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<string | FetchArgs, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, never, DownloadStatus, "gen3Services">>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface JobStatus {
|
|
2
|
+
uid: string;
|
|
3
|
+
status: 'Running' | 'Completed' | 'Failed' | 'Unknown';
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface JobOutput {
|
|
7
|
+
output: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DownloadStatus {
|
|
10
|
+
inProgress: boolean;
|
|
11
|
+
uid: string;
|
|
12
|
+
message: {
|
|
13
|
+
content: string | {
|
|
14
|
+
msg: string;
|
|
15
|
+
url: string;
|
|
16
|
+
};
|
|
17
|
+
active: boolean;
|
|
18
|
+
title: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CoreState } from '../../reducers';
|
|
2
|
+
export type DRSHostnameMap = Record<string, string>;
|
|
3
|
+
export declare const drsHostnamesReducer: import("redux").Reducer<Record<string, string>>;
|
|
4
|
+
export declare const setDRSHostnames: import("@reduxjs/toolkit").ActionCreatorWithPayload<DRSHostnameMap, "drsResolver/setDRSHostnames">;
|
|
5
|
+
export declare const drsHostnamesSelector: (id: string, state: CoreState) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resolveCachedDRS: (guidsForHostnameResolution: string[]) => Promise<Record<string, string>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves DRS object ID from a list of guids using dataguids.org
|
|
3
|
+
* Use of this function should be limited
|
|
4
|
+
* @param guidsForHostnameResolution
|
|
5
|
+
*/
|
|
6
|
+
export declare const resolveDRSWithDataGUISOrg: (guidsForHostnameResolution: string[]) => Promise<Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface APIKey {
|
|
2
|
+
readonly jti: string;
|
|
3
|
+
readonly exp: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Gen3FenceCredentials {
|
|
6
|
+
readonly jtis: ReadonlyArray<APIKey>;
|
|
7
|
+
}
|
|
8
|
+
interface DeleteCredentialParams {
|
|
9
|
+
readonly csrfToken?: string;
|
|
10
|
+
readonly id: string;
|
|
11
|
+
}
|
|
12
|
+
interface AuthorizeFromCredentialsParams {
|
|
13
|
+
api_key: string;
|
|
14
|
+
key_id: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AuthTokenResponse {
|
|
17
|
+
access_token: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Adds a credentialsApi into the base gen3Api
|
|
21
|
+
* @endpoints Includes get, add, and remove credential operations
|
|
22
|
+
* @see https://github.com/uc-cdis/fence/blob/master/openapis/swagger.yaml#L972-L1033
|
|
23
|
+
* @param getCredentials - List all the API keys for the current user
|
|
24
|
+
* @param addNewCredential - Get a new API key for the current user
|
|
25
|
+
* @param removeCredential - Delete API access key with given ID for current user
|
|
26
|
+
* @returns: A fence credential API for manipulating user credentials
|
|
27
|
+
*/
|
|
28
|
+
export declare const credentialsApi: import("@reduxjs/toolkit/dist/query").Api<import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "Credentials", never> & {
|
|
29
|
+
getCredentials: import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", readonly APIKey[], "gen3Services">;
|
|
30
|
+
addNewCredential: import("@reduxjs/toolkit/dist/query").MutationDefinition<string, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", any, "gen3Services">;
|
|
31
|
+
removeCredential: import("@reduxjs/toolkit/dist/query").MutationDefinition<DeleteCredentialParams, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", void, "gen3Services">;
|
|
32
|
+
authorizeFromCredentials: import("@reduxjs/toolkit/dist/query").MutationDefinition<AuthorizeFromCredentialsParams, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", AuthTokenResponse, "gen3Services">;
|
|
33
|
+
}, "gen3Services", "Credentials", keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>;
|
|
34
|
+
export declare const useGetCredentialsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", readonly APIKey[], "gen3Services">>, useAddNewCredentialMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/dist/query").MutationDefinition<string, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", any, "gen3Services">>, useRemoveCredentialMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/dist/query").MutationDefinition<DeleteCredentialParams, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", void, "gen3Services">>, useAuthorizeFromCredentialsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/dist/query").MutationDefinition<AuthorizeFromCredentialsParams, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "Credentials", AuthTokenResponse, "gen3Services">>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface NameUrl {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly url: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Gen3LoginProvider {
|
|
6
|
+
readonly desc?: string;
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly idp: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly secondary: boolean;
|
|
11
|
+
readonly url: string;
|
|
12
|
+
readonly urls: Array<NameUrl>;
|
|
13
|
+
}
|
|
14
|
+
export interface Gen3FenceLoginProviders {
|
|
15
|
+
readonly default_provider: Gen3LoginProvider;
|
|
16
|
+
readonly providers: Array<Gen3LoginProvider>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates a fence API endpoint for handling login processes
|
|
20
|
+
* @param endpoints - defined endpoint query for logging in
|
|
21
|
+
* @returns: The generated fence login API slice
|
|
22
|
+
*/
|
|
23
|
+
export declare const loginProvidersApi: import("@reduxjs/toolkit/dist/query").Api<import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, {
|
|
24
|
+
getLoginProviders: import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, never, Gen3FenceLoginProviders, "gen3Services">;
|
|
25
|
+
}, "gen3Services", never, keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>;
|
|
26
|
+
export declare const useGetLoginProvidersQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, never, Gen3FenceLoginProviders, "gen3Services">>;
|
|
27
|
+
export interface FetchRequest {
|
|
28
|
+
readonly endpoint: string;
|
|
29
|
+
readonly method?: 'GET' | 'POST';
|
|
30
|
+
readonly body?: object;
|
|
31
|
+
readonly headers?: Record<string, string>;
|
|
32
|
+
readonly isJSON?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Logout from fence
|
|
36
|
+
*/
|
|
37
|
+
export declare const logoutFence: (redirect?: string) => Promise<import("./types").Gen3FenceResponse<unknown>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type FetchRequest, type Gen3LoginProvider, type NameUrl, logoutFence, useGetLoginProvidersQuery } from './fenceApi';
|
|
2
|
+
import { type APIKey, type Gen3FenceCredentials, useGetCredentialsQuery, useAddNewCredentialMutation, useRemoveCredentialMutation, useAuthorizeFromCredentialsMutation } from './credentialsApi';
|
|
3
|
+
import { useGetJWKKeysQuery } from './jwtApi';
|
|
4
|
+
import { FetchError, Gen3FenceResponse } from './types';
|
|
5
|
+
import { fetchFence } from './utils';
|
|
6
|
+
export { type Gen3FenceResponse, type FetchError, type FetchRequest, type APIKey, type Gen3FenceCredentials, type Gen3LoginProvider, type NameUrl, fetchFence, logoutFence, useGetCredentialsQuery, useAddNewCredentialMutation, useRemoveCredentialMutation, useGetLoginProvidersQuery, useGetJWKKeysQuery, useAuthorizeFromCredentialsMutation, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface JWTKeys {
|
|
2
|
+
keys: ReadonlyArray<string[2]>;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A fence API for getting the public keys which can be used to validate
|
|
6
|
+
* JWTs issued and signed by fence
|
|
7
|
+
* @returns: Fence public keys
|
|
8
|
+
*/
|
|
9
|
+
export declare const jwtApi: import("@reduxjs/toolkit/dist/query").Api<import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "fenceJWT", never> & {
|
|
10
|
+
getJWKKeys: import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "fenceJWT", readonly JWTKeys[], "gen3Services">;
|
|
11
|
+
}, "gen3Services", "fenceJWT", keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>;
|
|
12
|
+
export declare const useGetJWKKeysQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/dist/query").QueryDefinition<void, import("@reduxjs/toolkit/dist/query").BaseQueryFn<string | import("@reduxjs/toolkit/dist/query").FetchArgs, unknown, import("@reduxjs/toolkit/dist/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/dist/query").FetchBaseQueryMeta>, "fenceJWT", readonly JWTKeys[], "gen3Services">>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSONObject } from '../../types';
|
|
2
|
+
export interface FetchError<T> {
|
|
3
|
+
readonly url: string;
|
|
4
|
+
readonly status: number;
|
|
5
|
+
readonly statusText: string;
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly request?: T;
|
|
8
|
+
}
|
|
9
|
+
export interface Gen3FenceResponse<H = JSONObject | string> {
|
|
10
|
+
readonly data: H;
|
|
11
|
+
readonly status: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FetchError, Gen3FenceResponse } from './types';
|
|
2
|
+
import { FetchRequest } from './fenceApi';
|
|
3
|
+
/**
|
|
4
|
+
* Template for fence error response dict
|
|
5
|
+
* @returns: An error dict response from a RESTFUL API request
|
|
6
|
+
*/
|
|
7
|
+
export declare const buildFetchError: <T>(res: Response, request?: T) => Promise<FetchError<T>>;
|
|
8
|
+
/**
|
|
9
|
+
* Template for a standard fence request
|
|
10
|
+
* @returns: response data
|
|
11
|
+
*/
|
|
12
|
+
export declare const fetchFence: <T>({ endpoint, headers, body, method, isJSON, }: FetchRequest) => Promise<Gen3FenceResponse<T>>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { EnumFilterValue, Equals, ExcludeIfAny, Excludes, FilterSet, FilterValue, GreaterThan, GreaterThanOrEquals, Includes, Intersection, LessThan, LessThanOrEquals, NestedFilter, NotEquals, Operation, OperationHandler, OperationWithField, Union } from './types';
|
|
2
|
+
export declare const isOperationWithField: (operation: OperationWithField | Operation) => operation is OperationWithField;
|
|
3
|
+
export declare const extractFilterValue: (op: Operation) => FilterValue;
|
|
4
|
+
export declare const extractEnumFilterValue: (op: Operation) => EnumFilterValue;
|
|
5
|
+
export declare const handleOperation: <T>(handler: OperationHandler<T>, op: Operation) => T;
|
|
6
|
+
/**
|
|
7
|
+
* Return true if a FilterSet's root value is an empty object
|
|
8
|
+
* @param fs - FilterSet to test
|
|
9
|
+
*/
|
|
10
|
+
export declare const isFilterEmpty: (fs: FilterSet) => boolean;
|
|
11
|
+
export interface FilterGroup {
|
|
12
|
+
readonly filterIndex: number;
|
|
13
|
+
readonly filter: FilterSet;
|
|
14
|
+
}
|
|
15
|
+
export interface GQLEqual {
|
|
16
|
+
'=': {
|
|
17
|
+
[key: string]: string | number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface GQLNotEqual {
|
|
21
|
+
'!=': {
|
|
22
|
+
[key: string]: string | number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface GQLLessThan {
|
|
26
|
+
'<': {
|
|
27
|
+
[key: string]: string | number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface GQLLessThanOrEquals {
|
|
31
|
+
'<=': {
|
|
32
|
+
[key: string]: string | number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface GQLGreaterThan {
|
|
36
|
+
'>': {
|
|
37
|
+
[key: string]: string | number;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface GQLGreaterThanOrEquals {
|
|
41
|
+
'>=': {
|
|
42
|
+
[key: string]: string | number;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface GQLIncludes {
|
|
46
|
+
in: {
|
|
47
|
+
[key: string]: ReadonlyArray<string | number>;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface GQLExcludes {
|
|
51
|
+
exclude: {
|
|
52
|
+
[key: string]: ReadonlyArray<string | number>;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface GQLExcludeIfAny {
|
|
56
|
+
excludeifany: {
|
|
57
|
+
[key: string]: ReadonlyArray<string | number>;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface GQLIntersection {
|
|
61
|
+
and: ReadonlyArray<GQLFilter>;
|
|
62
|
+
}
|
|
63
|
+
export interface GQLUnion {
|
|
64
|
+
or: ReadonlyArray<GQLFilter>;
|
|
65
|
+
}
|
|
66
|
+
type NestedContents = GQLFilter & {
|
|
67
|
+
path: string;
|
|
68
|
+
};
|
|
69
|
+
export interface GQLNestedFilter {
|
|
70
|
+
nested: NestedContents;
|
|
71
|
+
}
|
|
72
|
+
export type GQLFilter = GQLEqual | GQLNotEqual | GQLLessThan | GQLLessThanOrEquals | GQLGreaterThan | GQLGreaterThanOrEquals | GQLIncludes | GQLExcludes | GQLExcludeIfAny | GQLIntersection | GQLUnion | GQLNestedFilter;
|
|
73
|
+
export declare class ToGqlHandler implements OperationHandler<GQLFilter> {
|
|
74
|
+
handleEquals: (op: Equals) => GQLEqual;
|
|
75
|
+
handleNotEquals: (op: NotEquals) => GQLNotEqual;
|
|
76
|
+
handleLessThan: (op: LessThan) => GQLLessThan;
|
|
77
|
+
handleLessThanOrEquals: (op: LessThanOrEquals) => GQLLessThanOrEquals;
|
|
78
|
+
handleGreaterThan: (op: GreaterThan) => GQLGreaterThan;
|
|
79
|
+
handleGreaterThanOrEquals: (op: GreaterThanOrEquals) => GQLGreaterThanOrEquals;
|
|
80
|
+
handleIncludes: (op: Includes) => GQLIncludes;
|
|
81
|
+
handleExcludes: (op: Excludes) => GQLExcludes;
|
|
82
|
+
handleExcludeIfAny: (op: ExcludeIfAny) => GQLExcludeIfAny;
|
|
83
|
+
handleIntersection: (op: Intersection) => GQLIntersection;
|
|
84
|
+
handleUnion: (op: Union) => GQLUnion;
|
|
85
|
+
handleNestedFilter: (op: NestedFilter) => GQLNestedFilter;
|
|
86
|
+
}
|
|
87
|
+
export declare const convertFilterSetToGqlFilter: (fs: FilterSet, toplevelOp?: "and" | "or") => GQLFilter;
|
|
88
|
+
/**
|
|
89
|
+
* Extract the operand values, if operands themselves have values, otherwise undefined.
|
|
90
|
+
*/
|
|
91
|
+
export declare class ValueExtractorHandler implements OperationHandler<FilterValue> {
|
|
92
|
+
handleEquals: (op: Equals) => string | number;
|
|
93
|
+
handleNotEquals: (op: NotEquals) => string | number;
|
|
94
|
+
handleIncludes: (op: Includes) => ReadonlyArray<string | number>;
|
|
95
|
+
handleExcludes: (op: Excludes) => ReadonlyArray<string | number>;
|
|
96
|
+
handleExcludeIfAny: (op: ExcludeIfAny) => ReadonlyArray<string | number>;
|
|
97
|
+
handleGreaterThanOrEquals: (op: GreaterThanOrEquals) => string | number;
|
|
98
|
+
handleGreaterThan: (op: GreaterThan) => string | number;
|
|
99
|
+
handleLessThan: (op: LessThan) => string | number;
|
|
100
|
+
handleLessThanOrEquals: (op: LessThanOrEquals) => string | number;
|
|
101
|
+
handleIntersection: (op: Intersection) => undefined;
|
|
102
|
+
handleUnion: (op: Union) => undefined;
|
|
103
|
+
handleNestedFilter: (op: NestedFilter) => undefined;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Extract the operand values, if operands themselves have values, otherwise undefined.
|
|
107
|
+
*/
|
|
108
|
+
export declare class EnumValueExtractorHandler implements OperationHandler<EnumFilterValue | undefined> {
|
|
109
|
+
handleEquals: (_: Equals) => undefined;
|
|
110
|
+
handleNotEquals: (_: NotEquals) => undefined;
|
|
111
|
+
handleIncludes: (op: Includes) => ReadonlyArray<string | number>;
|
|
112
|
+
handleExcludes: (op: Excludes) => ReadonlyArray<string | number>;
|
|
113
|
+
handleExcludeIfAny: (op: ExcludeIfAny) => ReadonlyArray<string | number>;
|
|
114
|
+
handleGreaterThanOrEquals: (_: GreaterThanOrEquals) => undefined;
|
|
115
|
+
handleGreaterThan: (_: GreaterThan) => undefined;
|
|
116
|
+
handleLessThan: (op: LessThan) => undefined;
|
|
117
|
+
handleLessThanOrEquals: (op: LessThanOrEquals) => undefined;
|
|
118
|
+
handleIntersection: (op: Intersection) => undefined;
|
|
119
|
+
handleUnion: (op: Union) => undefined;
|
|
120
|
+
handleNestedFilter: (op: NestedFilter) => EnumFilterValue | undefined;
|
|
121
|
+
}
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { isFilterEmpty, isOperationWithField, convertFilterSetToGqlFilter, handleOperation, extractEnumFilterValue, extractFilterValue, type GQLFilter } from './filters';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './utils';
|
|
4
|
+
export { handleOperation, isFilterEmpty, isOperationWithField, convertFilterSetToGqlFilter, extractFilterValue, extractEnumFilterValue, type GQLFilter, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|