From f9f037be10e49c3e4e6e5ca6962bcc554e23ffe6 Mon Sep 17 00:00:00 2001 From: manelcecs Date: Tue, 2 Jan 2024 09:01:31 +0100 Subject: [PATCH] Add shortcuts for category filters Temp ref to hpc-api-core --- package.json | 2 +- .../flows/flow-search-service.ts | 125 ++++++++++++++++-- src/domain-services/flows/graphql/args.ts | 76 ++++++----- .../flows/strategy/flow-search-strategy.ts | 2 +- .../flows/strategy/flowID-search-strategy.ts | 14 +- ...-flow-category-conditions-strategy-impl.ts | 12 +- ...Ids-flow-mixed-conditions-strategy-impl.ts | 59 --------- ...ds-flow-object-conditions-strategy-impl.ts | 8 +- .../search-flow-by-filters-strategy-impl.ts | 67 +++++----- .../flows/strategy/impl/utils.ts | 9 +- yarn.lock | 4 +- 11 files changed, 217 insertions(+), 161 deletions(-) delete mode 100644 src/domain-services/flows/strategy/impl/get-flowIds-flow-mixed-conditions-strategy-impl.ts diff --git a/package.json b/package.json index 54b9f0b7..d2566809 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "lint": "yarn lint-prettier && yarn lint-eslint" }, "dependencies": { - "@unocha/hpc-api-core": "github:UN-OCHA/hpc-api-core#3a3030ee83ad77e5fd7c40238d5ecabe1e6c7da9", + "@unocha/hpc-api-core": "github:UN-OCHA/hpc-api-core#e298382f38848370c6daa0ac86b2016eddbef356", "apollo-server-hapi": "^3.12.0", "bunyan": "^1.8.15", "class-validator": "^0.14.0", diff --git a/src/domain-services/flows/flow-search-service.ts b/src/domain-services/flows/flow-search-service.ts index b3d1bbfa..f3bfb9fc 100644 --- a/src/domain-services/flows/flow-search-service.ts +++ b/src/domain-services/flows/flow-search-service.ts @@ -81,15 +81,43 @@ export class FlowSearchService { flowObjectFilters, flowCategoryFilters, pending: isPendingFlows, + commitment: isCommitmentFlows, + paid: isPaidFlows, + pledged: isPledgedFlows, + carryover: isCarryoverFlows, + parked: isParkedFlows, + pass_through: isPassThroughFlows, + standard: isStandardFlows, } = filters; + // Validate the shortcut filters + // There must be only one shortcut filter + // if only one is defined + // return an object like + // { {where:{ + // group: 'inactiveReason', + // name: 'Pending review', + // }, operation: 'IN'} } + // if more than one is defined + // throw an error + const shortcutFilter = this.validateShortcutFilters( + isPendingFlows, + isCommitmentFlows, + isPaidFlows, + isPledgedFlows, + isCarryoverFlows, + isParkedFlows, + isPassThroughFlows, + isStandardFlows + ); + // Once we've gathered all the filters, we need to determine the strategy // to use in order to obtain the flowIDs const strategy: FlowSearchStrategy = this.determineStrategy( flowFilters, flowObjectFilters, flowCategoryFilters, - isPendingFlows, + shortcutFilter, orderBy ); @@ -109,7 +137,8 @@ export class FlowSearchService { flowFilters, flowObjectFilters, flowCategoryFilters, - searchPendingFlows: isPendingFlows, + // shortcuts for categories + shortcutFilter, }); // Remove the extra item used to check hasNextPage @@ -280,11 +309,63 @@ export class FlowSearchService { }; } + /** + * This method validates that only one shortcut filter is defined + * and returns the shortcut filter defined with the operation + * IN if is true or NOT IN if is false + * + * @param isPendingFlows + * @param isCommitmentFlows + * @param isPaidFlows + * @param isPledgedFlows + * @param isCarryoverFlows + * @param isParkedFlows + * @param isPassThroughFlows + * @param isStandardFlows + * @returns { category: String, operation: Op.IN | Op.NOT_IN} + */ + validateShortcutFilters( + isPendingFlows: boolean, + isCommitmentFlows: boolean, + isPaidFlows: boolean, + isPledgedFlows: boolean, + isCarryoverFlows: boolean, + isParkedFlows: boolean, + isPassThroughFlows: boolean, + isStandardFlows: boolean + ) { + const filters = [ + { flag: isPendingFlows, category: 'Pending', group: 'inactiveReason' }, + { flag: isCommitmentFlows, category: 'Commitment', group: 'flowStatus' }, + { flag: isPaidFlows, category: 'Paid', group: 'flowStatus' }, + { flag: isPledgedFlows, category: 'Pledged', group: 'flowStatus' }, + { flag: isCarryoverFlows, category: 'Carryover', group: 'flowType' }, + { flag: isParkedFlows, category: 'Parked', group: 'flowType' }, + { flag: isPassThroughFlows, category: 'Pass Through', group: 'flowType' }, + { flag: isStandardFlows, category: 'Standard', group: 'flowType' }, + ]; + + const shortcutFilters = filters + .filter((filter) => filter.flag) + .map((filter) => ({ + where: { group: filter.group, name: filter.category }, + operation: filter.flag ? Op.IN : Op.NOT_IN, + })); + + if (shortcutFilters.length > 1) { + throw new Error( + 'Only one shortcut filter can be defined at the same time' + ); + } + + return shortcutFilters.length === 1 ? shortcutFilters[0] : null; + } + determineStrategy( flowFilters: SearchFlowsFilters, flowObjectFilters: FlowObjectFilters[], flowCategoryFilters: FlowCategory[], - isPendingFlows: boolean, + shortcutFilter: any | null, orderBy?: FlowOrderBy ) { // If there are no filters (flowFilters, flowObjectFilters, flowCategoryFilters or pending) @@ -297,18 +378,20 @@ export class FlowSearchService { const isFlowFiltersDefined = flowFilters !== undefined; const isFlowObjectFiltersDefined = flowObjectFilters !== undefined; const isFlowCategoryFiltersDefined = flowCategoryFilters !== undefined; - const isFilterByPendingFlowsDefined = isPendingFlows !== undefined; + // Shortcuts fot categories + const isFilterByShortcutsDefined = shortcutFilter !== null; const isNoFilterDefined = !isFlowFiltersDefined && !isFlowObjectFiltersDefined && !isFlowCategoryFiltersDefined && - !isFilterByPendingFlowsDefined; + !isFilterByShortcutsDefined; + const isFlowFiltersOnly = isFlowFiltersDefined && !isFlowObjectFiltersDefined && !isFlowCategoryFiltersDefined && - !isFilterByPendingFlowsDefined; + !isFilterByShortcutsDefined; if (isOrderByEntityFlow && (isNoFilterDefined || isFlowFiltersOnly)) { // Use onlyFlowFiltersStrategy @@ -683,6 +766,13 @@ export class FlowSearchService { flowObjectFilters, flowCategoryFilters, pending: isPendingFlows, + commitment: isCommitmentFlows, + paid: isPaidFlows, + pledged: isPledgedFlows, + carryover: isCarryoverFlows, + parked: isParkedFlows, + pass_through: isPassThroughFlows, + standard: isStandardFlows, } = args; if (!flowFilters) { @@ -692,13 +782,31 @@ export class FlowSearchService { flowFilters.activeStatus = true; } + // Validate the shortcut filters + // There must be only one shortcut filter + // if only one is defined + // return an object like + // { category: 'Parked', operation: 'IN' } + // if more than one is defined + // throw an error + const shortcutFilter = this.validateShortcutFilters( + isPendingFlows, + isCommitmentFlows, + isPaidFlows, + isPledgedFlows, + isCarryoverFlows, + isParkedFlows, + isPassThroughFlows, + isStandardFlows + ); + // Once we've gathered all the filters, we need to determine the strategy // to use in order to obtain the flowIDs const strategy: FlowSearchStrategy = this.determineStrategy( flowFilters, flowObjectFilters, flowCategoryFilters, - isPendingFlows + shortcutFilter ); const { flows, count } = await strategy.search({ @@ -707,7 +815,8 @@ export class FlowSearchService { flowFilters, flowObjectFilters, flowCategoryFilters, - searchPendingFlows: isPendingFlows, + // shortcuts for categories + shortcutFilter, }); const flowsAmountUSD: Array = flows.map( diff --git a/src/domain-services/flows/graphql/args.ts b/src/domain-services/flows/graphql/args.ts index 9ab22ce2..02bb4662 100644 --- a/src/domain-services/flows/graphql/args.ts +++ b/src/domain-services/flows/graphql/args.ts @@ -2,36 +2,6 @@ import { ArgsType, Field, InputType } from 'type-graphql'; import { PaginationArgs } from '../../../utils/graphql/pagination'; import { type FlowSortField } from './types'; -@InputType() -export class FlowStatusFilters { - @Field(() => Boolean, { nullable: true }) - pending: boolean | null; - - @Field(() => Boolean, { nullable: true }) - commitment: boolean | null; - - @Field(() => Boolean, { nullable: true }) - paid: boolean | null; - - @Field(() => Boolean, { nullable: true }) - pledged: boolean | null; -} - -@InputType() -export class FlowTypeFilters { - @Field(() => Boolean, { nullable: true }) - carryover: boolean | null; - - @Field(() => Boolean, { nullable: true }) - parked: boolean | null; - - @Field(() => Boolean, { nullable: true }) - pass_through: boolean | null; - - @Field(() => Boolean, { nullable: true }) - standard: boolean | null; -} - @InputType() export class SearchFlowsFilters { @Field(() => [Number], { nullable: true }) @@ -116,8 +86,29 @@ export class SearchFlowsArgs extends PaginationArgs { @Field(() => [FlowCategory], { nullable: true }) flowCategoryFilters: FlowCategory[]; - @Field({ nullable: true }) + @Field(() => Boolean, { nullable: true }) pending: boolean; + + @Field(() => Boolean, { nullable: true }) + commitment: boolean; + + @Field(() => Boolean, { nullable: true }) + paid: boolean; + + @Field(() => Boolean, { nullable: true }) + pledged: boolean; + + @Field(() => Boolean, { nullable: true }) + carryover: boolean; + + @Field(() => Boolean, { nullable: true }) + parked: boolean; + + @Field(() => Boolean, { nullable: true }) + pass_through: boolean; + + @Field(() => Boolean, { nullable: true }) + standard: boolean; } @ArgsType() @@ -134,6 +125,27 @@ export class SearchFlowsArgsNonPaginated { @Field(() => [FlowCategory], { nullable: true }) flowCategoryFilters: FlowCategory[]; - @Field({ nullable: true }) + @Field(() => Boolean, { nullable: true }) pending: boolean; + + @Field(() => Boolean, { nullable: true }) + commitment: boolean; + + @Field(() => Boolean, { nullable: true }) + paid: boolean; + + @Field(() => Boolean, { nullable: true }) + pledged: boolean; + + @Field(() => Boolean, { nullable: true }) + carryover: boolean; + + @Field(() => Boolean, { nullable: true }) + parked: boolean; + + @Field(() => Boolean, { nullable: true }) + pass_through: boolean; + + @Field(() => Boolean, { nullable: true }) + standard: boolean; } diff --git a/src/domain-services/flows/strategy/flow-search-strategy.ts b/src/domain-services/flows/strategy/flow-search-strategy.ts index 4264cf70..25e4cff4 100644 --- a/src/domain-services/flows/strategy/flow-search-strategy.ts +++ b/src/domain-services/flows/strategy/flow-search-strategy.ts @@ -21,7 +21,7 @@ export interface FlowSearchArgs { limit?: number; orderBy?: any; cursorCondition?: any; - searchPendingFlows?: boolean; + shortcutFilter: any; } export interface FlowSearchStrategy { diff --git a/src/domain-services/flows/strategy/flowID-search-strategy.ts b/src/domain-services/flows/strategy/flowID-search-strategy.ts index e63d09a3..1671d3d9 100644 --- a/src/domain-services/flows/strategy/flowID-search-strategy.ts +++ b/src/domain-services/flows/strategy/flowID-search-strategy.ts @@ -6,13 +6,15 @@ export interface FlowIdSearchStrategyResponse { flowIDs: FlowId[]; } +export interface FlowIdSearchStrategyArgs { + models: Database; + flowObjectsConditions?: Map>; + flowCategoryConditions?: FlowCategory[]; + shortcutFilter?: any | null; +} + export interface FlowIDSearchStrategy { - search( - models: Database, - flowObjectsConditions: Map>, - flowCategoryConditions: FlowCategory[], - filterByPendingFlows?: boolean - ): Promise; + search(args: FlowIdSearchStrategyArgs): Promise; generateWhereClause( flowIds: FlowId[], diff --git a/src/domain-services/flows/strategy/impl/get-flowIds-flow-category-conditions-strategy-impl.ts b/src/domain-services/flows/strategy/impl/get-flowIds-flow-category-conditions-strategy-impl.ts index f811deed..1511428f 100644 --- a/src/domain-services/flows/strategy/impl/get-flowIds-flow-category-conditions-strategy-impl.ts +++ b/src/domain-services/flows/strategy/impl/get-flowIds-flow-category-conditions-strategy-impl.ts @@ -7,6 +7,7 @@ import { Service } from 'typedi'; import { CategoryService } from '../../../categories/category-service'; import { type FlowCategory } from '../../graphql/args'; import { + FlowIdSearchStrategyArgs, type FlowIDSearchStrategy, type FlowIdSearchStrategyResponse, } from '../flowID-search-strategy'; @@ -19,14 +20,13 @@ export class GetFlowIdsFromCategoryConditionsStrategyImpl constructor(private readonly categoryService: CategoryService) {} async search( - models: Database, - _flowObjectsConditions: Map>, - flowCategoryConditions: FlowCategory[], - filterByPendingFlows: boolean | undefined + args: FlowIdSearchStrategyArgs ): Promise { + const { models, flowCategoryConditions, shortcutFilter } = args; + const whereClause = mapFlowCategoryConditionsToWhereClause( - filterByPendingFlows, - flowCategoryConditions + shortcutFilter, + flowCategoryConditions! ); const categories = await this.categoryService.findCategories( diff --git a/src/domain-services/flows/strategy/impl/get-flowIds-flow-mixed-conditions-strategy-impl.ts b/src/domain-services/flows/strategy/impl/get-flowIds-flow-mixed-conditions-strategy-impl.ts deleted file mode 100644 index ff046cc6..00000000 --- a/src/domain-services/flows/strategy/impl/get-flowIds-flow-mixed-conditions-strategy-impl.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { type Database } from '@unocha/hpc-api-core/src/db'; -import { type FlowId } from '@unocha/hpc-api-core/src/db/models/flow'; -import { Op } from '@unocha/hpc-api-core/src/db/util/conditions'; -import { Service } from 'typedi'; -import { type FlowCategory } from '../../graphql/args'; -import { - type FlowIDSearchStrategy, - type FlowIdSearchStrategyResponse, -} from '../flowID-search-strategy'; -import { GetFlowIdsFromCategoryConditionsStrategyImpl } from './get-flowIds-flow-category-conditions-strategy-impl'; -import { GetFlowIdsFromObjectConditionsStrategyImpl } from './get-flowIds-flow-object-conditions-strategy-impl'; -import { mergeFlowIDsFromFilteredFlowObjectsAndFlowCategories } from './utils'; - -@Service() -export class GetFlowIdsFromMixedConditionsStrategyImpl - implements FlowIDSearchStrategy -{ - constructor( - private readonly getFlowIdsFromObjectConditionsStrategy: GetFlowIdsFromObjectConditionsStrategyImpl, - private readonly getFlowIdsFromCategoryConditionsStrategy: GetFlowIdsFromCategoryConditionsStrategyImpl - ) {} - - async search( - models: Database, - flowObjectsConditions: Map>, - flowCategoryConditions: FlowCategory[], - filterByPendingFlows: boolean - ): Promise { - const { flowIDs: flowIdsFromFlowObjects }: FlowIdSearchStrategyResponse = - await this.getFlowIdsFromObjectConditionsStrategy.search( - models, - flowObjectsConditions - ); - - const { flowIDs: flowIdsFromFlowCategories }: FlowIdSearchStrategyResponse = - await this.getFlowIdsFromCategoryConditionsStrategy.search( - models, - flowObjectsConditions, - flowCategoryConditions, - filterByPendingFlows - ); - - const mergeFlowIDs: FlowId[] = - mergeFlowIDsFromFilteredFlowObjectsAndFlowCategories( - flowIdsFromFlowObjects, - flowIdsFromFlowCategories - ); - - return { flowIDs: mergeFlowIDs }; - } - - generateWhereClause(flowIds: FlowId[]) { - return { - id: { - [Op.IN]: flowIds, - }, - }; - } -} diff --git a/src/domain-services/flows/strategy/impl/get-flowIds-flow-object-conditions-strategy-impl.ts b/src/domain-services/flows/strategy/impl/get-flowIds-flow-object-conditions-strategy-impl.ts index 974436f5..f8bd56ba 100644 --- a/src/domain-services/flows/strategy/impl/get-flowIds-flow-object-conditions-strategy-impl.ts +++ b/src/domain-services/flows/strategy/impl/get-flowIds-flow-object-conditions-strategy-impl.ts @@ -1,10 +1,10 @@ -import { type Database } from '@unocha/hpc-api-core/src/db'; import { type FlowId } from '@unocha/hpc-api-core/src/db/models/flow'; import { Op } from '@unocha/hpc-api-core/src/db/util/conditions'; import { Service } from 'typedi'; import { FlowObjectService } from '../../../flow-object/flow-object-service'; import { type FlowIDSearchStrategy, + type FlowIdSearchStrategyArgs, type FlowIdSearchStrategyResponse, } from '../flowID-search-strategy'; import { mapFlowObjectConditionsToWhereClause } from './utils'; @@ -16,11 +16,11 @@ export class GetFlowIdsFromObjectConditionsStrategyImpl constructor(private readonly flowObjectService: FlowObjectService) {} async search( - models: Database, - flowObjectsConditions: Map> + args: FlowIdSearchStrategyArgs ): Promise { + const { models, flowObjectsConditions } = args; const flowObjectWhere = mapFlowObjectConditionsToWhereClause( - flowObjectsConditions + flowObjectsConditions! ); const flowIDsFromFilteredFlowObjects: FlowId[] = []; diff --git a/src/domain-services/flows/strategy/impl/search-flow-by-filters-strategy-impl.ts b/src/domain-services/flows/strategy/impl/search-flow-by-filters-strategy-impl.ts index 34d69c1c..a7f38f1a 100644 --- a/src/domain-services/flows/strategy/impl/search-flow-by-filters-strategy-impl.ts +++ b/src/domain-services/flows/strategy/impl/search-flow-by-filters-strategy-impl.ts @@ -34,7 +34,8 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { flowCategoryFilters, orderBy, limit, - searchPendingFlows: isSearchPendingFlows, + cursorCondition, + shortcutFilter, } = args; // First, we need to check if we need to sort by a certain entity @@ -57,24 +58,29 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { } // Now we need to check if we need to filter by category - // if it's using the shorcut 'pending' + // if it's using any of the shorcuts // or if there are any flowCategoryFilters - const isSearchByPendingDefined = isSearchPendingFlows !== undefined; + const isSearchByCategoryShotcut = shortcutFilter !== null; const isFilterByCategory = - isSearchByPendingDefined || flowCategoryFilters?.length > 0; + isSearchByCategoryShotcut || flowCategoryFilters?.length > 0; const flowIDsFromCategoryFilters: FlowId[] = []; if (isFilterByCategory) { - const flowIDsFromCategoryStrategy: FlowIdSearchStrategyResponse = - await this.getFlowIdsFromCategoryConditions.search( + const { flowIDs }: FlowIdSearchStrategyResponse = + await this.getFlowIdsFromCategoryConditions.search({ models, - new Map(), - flowCategoryFilters ?? [], - isSearchPendingFlows - ); - flowIDsFromCategoryFilters.push(...flowIDsFromCategoryStrategy.flowIDs); + flowCategoryConditions: flowCategoryFilters ?? [], + shortcutFilter, + flowObjectsConditions: undefined, + }); + // Since there can be many flowIDs returned + // This can cause 'Maximum call stack size exceeded' error + // When using the spread operator - a workaround is to use push fot each element + for (const flowID of flowIDs) { + flowIDsFromCategoryFilters.push(flowID); + } } // After that, if we need to filter by flowObjects @@ -86,10 +92,10 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { const flowObjectConditionsMap = mapFlowObjectConditions(flowObjectFilters); const flowIDsFromObjectStrategy: FlowIdSearchStrategyResponse = - await this.getFlowIdsFromObjectConditions.search( + await this.getFlowIdsFromObjectConditions.search({ models, - flowObjectConditionsMap - ); + flowObjectsConditions: flowObjectConditionsMap, + }); flowIDsFromObjectFilters.push(...flowIDsFromObjectStrategy.flowIDs); } @@ -100,8 +106,7 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { { isFilterByFlowObjects, isFilterByCategory, - willSearchPendingFlows: isSearchPendingFlows, - isSearchByPendingDefined, + shortcutFilter, }, { flowIDsFromCategoryFilters, @@ -110,16 +115,15 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { } ); - let rawOrderBy: string = ''; + let rawOrderBy: string | undefined; let orderByFlow: | { column: any; order: any; } - | undefined = { column: 'updatedAt', order: 'DESC' }; + | undefined; if (isSortByEntity) { rawOrderBy = `array_position(ARRAY[${sortByFlowIDs.join(',')}], "id")`; - orderByFlow = undefined; } else { orderByFlow = mapFlowOrderBy(orderBy); } @@ -140,12 +144,12 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { return { flows, count: countObject.count }; } + buildConditions( decisionArgs: { isFilterByFlowObjects: boolean; isFilterByCategory: boolean; - willSearchPendingFlows: boolean | undefined; - isSearchByPendingDefined: boolean; + shortcutFilter: any | null; }, filterArgs: { flowIDsFromCategoryFilters: FlowId[]; @@ -153,12 +157,8 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { flowFilters: any | undefined; } ): { countConditions: any; searchConditions: any } { - const { - isFilterByFlowObjects, - isFilterByCategory, - willSearchPendingFlows, - isSearchByPendingDefined, - } = decisionArgs; + const { isFilterByFlowObjects, isFilterByCategory, shortcutFilter } = + decisionArgs; const { flowIDsFromCategoryFilters, flowIDsFromObjectFilters, @@ -169,10 +169,7 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { // Check if we have flowIDs from flowObjects and flowCategoryFilters // if so, we need to filter by those flowIDs - if ( - (isFilterByFlowObjects || isFilterByCategory) && - isSearchByPendingDefined - ) { + if ((isFilterByFlowObjects || isFilterByCategory) && shortcutFilter) { const deduplicatedFlowIDs = [...new Set(flowIDsFromCategoryFilters)]; searchConditions = { @@ -216,12 +213,8 @@ export class SearchFlowByFiltersStrategy implements FlowSearchStrategy { }, ], }; - } else if (isFilterByCategory || isSearchByPendingDefined) { - const idCondition = isSearchByPendingDefined - ? willSearchPendingFlows - ? Op.IN - : Op.NOT_IN - : Op.IN; + } else if (isFilterByCategory || shortcutFilter) { + const idCondition = shortcutFilter ? shortcutFilter.operation : Op.IN; searchConditions = { ...searchConditions, diff --git a/src/domain-services/flows/strategy/impl/utils.ts b/src/domain-services/flows/strategy/impl/utils.ts index 5848ae8a..fe4e4a5b 100644 --- a/src/domain-services/flows/strategy/impl/utils.ts +++ b/src/domain-services/flows/strategy/impl/utils.ts @@ -42,18 +42,17 @@ export function mapFlowObjectConditionsToWhereClause( } export function mapFlowCategoryConditionsToWhereClause( - filterByPendingFlows: boolean | undefined, + shortcutFilter: any | null, flowCategoryConditions: FlowCategory[] ) { let whereClause = {}; - if (filterByPendingFlows !== undefined) { + const shortcutsWhereClause = shortcutFilter ? shortcutFilter.where : null; + if (shortcutsWhereClause) { whereClause = { - group: 'inactiveReason', - name: 'Pending review', + [Cond.OR]: [shortcutsWhereClause], }; } - if (flowCategoryConditions.length > 0) { // Map category filters // getting Id when possible diff --git a/yarn.lock b/yarn.lock index 24ba2e20..2d57d7da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1624,9 +1624,9 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@unocha/hpc-api-core@github:UN-OCHA/hpc-api-core#3a3030ee83ad77e5fd7c40238d5ecabe1e6c7da9": +"@unocha/hpc-api-core@github:UN-OCHA/hpc-api-core#e298382f38848370c6daa0ac86b2016eddbef356": version "7.0.0" - resolved "https://codeload.github.com/UN-OCHA/hpc-api-core/tar.gz/3a3030ee83ad77e5fd7c40238d5ecabe1e6c7da9" + resolved "https://codeload.github.com/UN-OCHA/hpc-api-core/tar.gz/e298382f38848370c6daa0ac86b2016eddbef356" dependencies: "@types/lodash" "^4.14.194" "@types/node-fetch" "2.6.3"