@gen3/core 0.11.35 → 0.11.37
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 +33 -32
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/guppy/guppyDownloadSlice.d.ts +226 -123
- package/dist/dts/features/guppy/guppyDownloadSlice.d.ts.map +1 -1
- package/dist/dts/features/guppy/guppySlice.d.ts +10 -13
- package/dist/dts/features/guppy/guppySlice.d.ts.map +1 -1
- package/dist/dts/features/guppy/index.d.ts +3 -2
- package/dist/dts/features/guppy/index.d.ts.map +1 -1
- package/dist/esm/index.js +31 -32
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +245 -136
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -2312,14 +2312,14 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2312
2312
|
}
|
|
2313
2313
|
}),
|
|
2314
2314
|
getRawDataAndTotalCounts: builder.query({
|
|
2315
|
-
query: ({ type, fields, filters, sort, offset = 0, size = 20, accessibility = Accessibility.ALL, format = undefined, indexPrefix = '' })=>{
|
|
2315
|
+
query: ({ type, fields, filters, sort, offset = 0, size = 20, accessibility = Accessibility.ALL, format = undefined, indexPrefix = '', filterName = 'filter' })=>{
|
|
2316
2316
|
const gqlFilter = convertFilterSetToGqlFilter(filters);
|
|
2317
2317
|
const params = [
|
|
2318
2318
|
...sort ? [
|
|
2319
2319
|
'$sort: JSON'
|
|
2320
2320
|
] : [],
|
|
2321
2321
|
...gqlFilter ? [
|
|
2322
|
-
|
|
2322
|
+
`$${filterName}: JSON`
|
|
2323
2323
|
] : [],
|
|
2324
2324
|
...format ? [
|
|
2325
2325
|
'$format: Format'
|
|
@@ -2334,12 +2334,12 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2334
2334
|
'sort: $sort'
|
|
2335
2335
|
] : [],
|
|
2336
2336
|
...gqlFilter ? [
|
|
2337
|
-
|
|
2337
|
+
`filter: $${filterName}`
|
|
2338
2338
|
] : []
|
|
2339
2339
|
].join(',');
|
|
2340
2340
|
const dataTypeLine = `${indexPrefix}${type} (accessibility: ${accessibility}, offset: ${offset}, first: ${size},
|
|
2341
2341
|
${dataParams}) {`;
|
|
2342
|
-
const typeAggsLine = `${type} (${gqlFilter &&
|
|
2342
|
+
const typeAggsLine = `${type} (${gqlFilter && `filter: $${filterName},`} accessibility: ${accessibility}) {`;
|
|
2343
2343
|
const processedFields = fields.map((field)=>rawDataQueryStrForEachField(field));
|
|
2344
2344
|
const query = `${queryLine}
|
|
2345
2345
|
${dataTypeLine}
|
|
@@ -2373,8 +2373,8 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2373
2373
|
]
|
|
2374
2374
|
}),
|
|
2375
2375
|
getAggs: builder.query({
|
|
2376
|
-
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, indexPrefix = '' })=>{
|
|
2377
|
-
return buildGetAggregationQuery(type, fields, filters, accessibility, filterSelf, undefined, indexPrefix);
|
|
2376
|
+
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, indexPrefix = '', filterName = 'filter' })=>{
|
|
2377
|
+
return buildGetAggregationQuery(type, fields, filters, accessibility, filterSelf, undefined, indexPrefix, filterName);
|
|
2378
2378
|
},
|
|
2379
2379
|
transformResponse: (response, _meta, args)=>{
|
|
2380
2380
|
const buckets = processHistogramResponse(response?.data?.[`${args?.indexPrefix ?? ''}_aggregation`][args.type] ?? {});
|
|
@@ -2395,8 +2395,8 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2395
2395
|
]
|
|
2396
2396
|
}),
|
|
2397
2397
|
getStatsAggregations: builder.query({
|
|
2398
|
-
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined, indexPrefix = '' })=>{
|
|
2399
|
-
return buildGetStatsAggregationQuery(type, fields, filters, accessibility, filterSelf, queryId, indexPrefix);
|
|
2398
|
+
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined, indexPrefix = '', filterName = 'filter' })=>{
|
|
2399
|
+
return buildGetStatsAggregationQuery(type, fields, filters, accessibility, filterSelf, queryId, indexPrefix, filterName);
|
|
2400
2400
|
},
|
|
2401
2401
|
transformResponse: (response, _meta, args)=>{
|
|
2402
2402
|
return processHistogramResponse(response?.data?.[`${args?.indexPrefix ?? ''}_aggregation`][args.type] ?? {});
|
|
@@ -2406,14 +2406,14 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2406
2406
|
]
|
|
2407
2407
|
}),
|
|
2408
2408
|
getSubAggs: builder.query({
|
|
2409
|
-
query: ({ type, mainField, termsFields = undefined, missingFields = undefined, numericAggAsText = false, filters = undefined, accessibility = Accessibility.ALL, indexPrefix = '' })=>{
|
|
2409
|
+
query: ({ type, mainField, termsFields = undefined, missingFields = undefined, numericAggAsText = false, filters = undefined, accessibility = Accessibility.ALL, indexPrefix = '', filterName = 'filter' })=>{
|
|
2410
2410
|
const nestedAggFields = {
|
|
2411
2411
|
termsFields: termsFields,
|
|
2412
2412
|
missingFields: missingFields
|
|
2413
2413
|
};
|
|
2414
|
-
const query = `query getSubAggs ( ${filters ??
|
|
2414
|
+
const query = `query getSubAggs ( ${filters ?? `$${filterName}: JSON,`} $nestedAggFields: JSON) {
|
|
2415
2415
|
${indexPrefix}_aggregation {
|
|
2416
|
-
${type} ( ${filters ??
|
|
2416
|
+
${type} ( ${filters ?? `filter: $${filterName}, filterSelf: false,`} nestedAggFields: $nestedAggFields, accessibility: ${accessibility}) {
|
|
2417
2417
|
_totalCounts
|
|
2418
2418
|
${nestedHistogramQueryStrForEachField(mainField, numericAggAsText)}
|
|
2419
2419
|
}`;
|
|
@@ -2421,7 +2421,7 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2421
2421
|
query: query,
|
|
2422
2422
|
variables: {
|
|
2423
2423
|
...filters && {
|
|
2424
|
-
|
|
2424
|
+
[filterName]: convertFilterSetToGqlFilter(filters)
|
|
2425
2425
|
},
|
|
2426
2426
|
nestedAggFields: nestedAggFields
|
|
2427
2427
|
}
|
|
@@ -2435,10 +2435,10 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2435
2435
|
]
|
|
2436
2436
|
}),
|
|
2437
2437
|
getCounts: builder.query({
|
|
2438
|
-
query: ({ type, filters, accessibility = Accessibility.ALL, queryId = undefined, indexPrefix = '' })=>{
|
|
2438
|
+
query: ({ type, filters, accessibility = Accessibility.ALL, queryId = undefined, indexPrefix = '', filterName = 'filter' })=>{
|
|
2439
2439
|
const gqlFilters = convertFilterSetToGqlFilter(filters);
|
|
2440
|
-
const queryLine = `query totalCounts${queryId ? `${indexPrefix}_${queryId}` : ''} ${gqlFilters ?
|
|
2441
|
-
const typeAggsLine = `${type} ${gqlFilters ?
|
|
2440
|
+
const queryLine = `query totalCounts${queryId ? `${indexPrefix}_${queryId}` : ''} ${gqlFilters ? `($${filterName}: JSON)` : ''}{`;
|
|
2441
|
+
const typeAggsLine = `${type} ${gqlFilters ? `(filter: $${filterName}, ` : '('} accessibility: ${accessibility}) {`;
|
|
2442
2442
|
const query = `${queryLine} ${indexPrefix}_aggregation {
|
|
2443
2443
|
${typeAggsLine}
|
|
2444
2444
|
_totalCount
|
|
@@ -2449,7 +2449,7 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2449
2449
|
query: query,
|
|
2450
2450
|
variables: {
|
|
2451
2451
|
...gqlFilters && {
|
|
2452
|
-
|
|
2452
|
+
[filterName]: gqlFilters
|
|
2453
2453
|
}
|
|
2454
2454
|
}
|
|
2455
2455
|
};
|
|
@@ -2468,11 +2468,11 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2468
2468
|
]
|
|
2469
2469
|
}),
|
|
2470
2470
|
getFieldCountSummary: builder.query({
|
|
2471
|
-
query: ({ type, field, filters, accessibility = Accessibility.ALL, indexPrefix = '' })=>{
|
|
2471
|
+
query: ({ type, field, filters, accessibility = Accessibility.ALL, indexPrefix = '', filterName = 'filter' })=>{
|
|
2472
2472
|
const gqlFilters = convertFilterSetToGqlFilter(filters);
|
|
2473
|
-
const query = `query summary (
|
|
2473
|
+
const query = `query summary ($${filterName}: JSON) {
|
|
2474
2474
|
${indexPrefix}_aggregation {
|
|
2475
|
-
${type} (filter:
|
|
2475
|
+
${type} (filter: $${filterName}, accessibility: ${accessibility}) {
|
|
2476
2476
|
${field} {
|
|
2477
2477
|
histogram {
|
|
2478
2478
|
sum,
|
|
@@ -2485,7 +2485,7 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
2485
2485
|
query: query,
|
|
2486
2486
|
variables: {
|
|
2487
2487
|
...gqlFilters && {
|
|
2488
|
-
|
|
2488
|
+
[filterName]: gqlFilters
|
|
2489
2489
|
}
|
|
2490
2490
|
}
|
|
2491
2491
|
};
|
|
@@ -2544,13 +2544,12 @@ const useGetIndexFields = (index, indexPrefix = '')=>{
|
|
|
2544
2544
|
});
|
|
2545
2545
|
return data ?? [];
|
|
2546
2546
|
};
|
|
2547
|
-
const buildGetAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined, indexPrefix = '')=>{
|
|
2547
|
+
const buildGetAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined, indexPrefix = '', filterName = 'filter')=>{
|
|
2548
2548
|
const queryStart = isFilterEmpty(filters) ? `query getAggs${queryId ? `_${queryId}` : ''} {
|
|
2549
2549
|
${indexPrefix}_aggregation {
|
|
2550
|
-
${type} (accessibility: ${accessibility}) {` : `query getAggs (
|
|
2550
|
+
${type} (accessibility: ${accessibility}) {` : `query getAggs ($${filterName}: JSON) {
|
|
2551
2551
|
${indexPrefix}_aggregation {
|
|
2552
|
-
|
|
2553
|
-
${type} (filter: $filter, filterSelf: ${filterSelf ? 'true' : 'false'}, accessibility: ${accessibility}) { _totalCount`;
|
|
2552
|
+
${type} (filter: $${filterName}, filterSelf: ${filterSelf ? 'true' : 'false'}, accessibility: ${accessibility}) { _totalCount`;
|
|
2554
2553
|
const query = `${queryStart}
|
|
2555
2554
|
${fields.map((field)=>histogramQueryStrForEachField(field))}
|
|
2556
2555
|
}
|
|
@@ -2559,18 +2558,18 @@ const buildGetAggregationQuery = (type, fields, filters, accessibility = Accessi
|
|
|
2559
2558
|
const queryBody = {
|
|
2560
2559
|
query: query,
|
|
2561
2560
|
variables: {
|
|
2562
|
-
|
|
2561
|
+
[filterName]: convertFilterSetToGqlFilter(filters)
|
|
2563
2562
|
}
|
|
2564
2563
|
};
|
|
2565
2564
|
return queryBody;
|
|
2566
2565
|
};
|
|
2567
|
-
const buildGetStatsAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined, indexPrefix = '')=>{
|
|
2566
|
+
const buildGetStatsAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined, indexPrefix = '', filterName = 'filter')=>{
|
|
2568
2567
|
const queryStart = isFilterEmpty(filters) ? `
|
|
2569
2568
|
query getStatsAggs${queryId ? `_${queryId}` : ''} {
|
|
2570
2569
|
${indexPrefix}_aggregation {
|
|
2571
|
-
${type} (accessibility: ${accessibility}) {` : `query getStatsAggs${queryId ? `_${queryId}` : ''} (
|
|
2570
|
+
${type} (accessibility: ${accessibility}) {` : `query getStatsAggs${queryId ? `_${queryId}` : ''} ($${filterName}: JSON) {
|
|
2572
2571
|
${indexPrefix}_aggregation {
|
|
2573
|
-
${type} (filter:
|
|
2572
|
+
${type} (filter: $${filterName}, filterSelf: ${filterSelf ? 'true' : 'false'}, accessibility: ${accessibility}) { _totalCount`;
|
|
2574
2573
|
const query = `${queryStart}
|
|
2575
2574
|
${fields.map((field)=>statsQueryStrForEachField(field))}
|
|
2576
2575
|
}
|
|
@@ -2579,7 +2578,7 @@ const buildGetStatsAggregationQuery = (type, fields, filters, accessibility = Ac
|
|
|
2579
2578
|
const queryBody = {
|
|
2580
2579
|
query: query,
|
|
2581
2580
|
variables: {
|
|
2582
|
-
|
|
2581
|
+
[filterName]: convertFilterSetToGqlFilter(filters)
|
|
2583
2582
|
}
|
|
2584
2583
|
};
|
|
2585
2584
|
return queryBody;
|
|
@@ -4969,7 +4968,7 @@ const { useGraphQLQuery } = graphQLAPI;
|
|
|
4969
4968
|
* @returns: A guppy download API for fetching bulk metadata
|
|
4970
4969
|
*/ const downloadRequestApi = gen3Api.injectEndpoints({
|
|
4971
4970
|
endpoints: (builder)=>({
|
|
4972
|
-
downloadFromGuppy: builder.
|
|
4971
|
+
downloadFromGuppy: builder.query({
|
|
4973
4972
|
query: ({ type, filter, accessibility, fields, sort })=>{
|
|
4974
4973
|
const queryBody = {
|
|
4975
4974
|
filter: convertFilterSetToGqlFilter(filter),
|
|
@@ -4993,7 +4992,7 @@ const { useGraphQLQuery } = graphQLAPI;
|
|
|
4993
4992
|
})
|
|
4994
4993
|
})
|
|
4995
4994
|
});
|
|
4996
|
-
const {
|
|
4995
|
+
const { useDownloadFromGuppyQuery, useLazyDownloadFromGuppyQuery } = downloadRequestApi;
|
|
4997
4996
|
|
|
4998
4997
|
const TAGS = 'manifest';
|
|
4999
4998
|
const manifestTags = gen3Api.enhanceEndpoints({
|
|
@@ -5868,6 +5867,7 @@ exports.cartReducerPath = cartReducerPath;
|
|
|
5868
5867
|
exports.clearActiveWorkspaceId = clearActiveWorkspaceId;
|
|
5869
5868
|
exports.clearCohortFilters = clearCohortFilters;
|
|
5870
5869
|
exports.cohortReducer = cohortReducer;
|
|
5870
|
+
exports.conversion = conversion;
|
|
5871
5871
|
exports.convertFilterSetToGqlFilter = convertFilterSetToGqlFilter;
|
|
5872
5872
|
exports.convertFilterToGqlFilter = convertFilterToGqlFilter;
|
|
5873
5873
|
exports.convertGqlFilterToFilter = convertGqlFilterToFilter;
|
|
@@ -6068,7 +6068,7 @@ exports.useCoreSelector = useCoreSelector;
|
|
|
6068
6068
|
exports.useCreateAuthzResourceMutation = useCreateAuthzResourceMutation;
|
|
6069
6069
|
exports.useCreateRequestMutation = useCreateRequestMutation;
|
|
6070
6070
|
exports.useDataLibrary = useDataLibrary;
|
|
6071
|
-
exports.
|
|
6071
|
+
exports.useDownloadFromGuppyQuery = useDownloadFromGuppyQuery;
|
|
6072
6072
|
exports.useFetchUserDetailsQuery = useFetchUserDetailsQuery;
|
|
6073
6073
|
exports.useGeneralGQLQuery = useGeneralGQLQuery;
|
|
6074
6074
|
exports.useGetAISearchStatusQuery = useGetAISearchStatusQuery;
|
|
@@ -6125,6 +6125,7 @@ exports.useGraphQLQuery = useGraphQLQuery;
|
|
|
6125
6125
|
exports.useIsExternalConnectedQuery = useIsExternalConnectedQuery;
|
|
6126
6126
|
exports.useIsUserLoggedIn = useIsUserLoggedIn;
|
|
6127
6127
|
exports.useLaunchWorkspaceMutation = useLaunchWorkspaceMutation;
|
|
6128
|
+
exports.useLazyDownloadFromGuppyQuery = useLazyDownloadFromGuppyQuery;
|
|
6128
6129
|
exports.useLazyFetchUserDetailsQuery = useLazyFetchUserDetailsQuery;
|
|
6129
6130
|
exports.useLazyGeneralGQLQuery = useLazyGeneralGQLQuery;
|
|
6130
6131
|
exports.useLazyGetAggsQuery = useLazyGetAggsQuery;
|