diff --git a/end-to-end-test/remote/specs/core/results.spec.js b/end-to-end-test/remote/specs/core/results.spec.js index a691498de93..cc5f460dbc1 100644 --- a/end-to-end-test/remote/specs/core/results.spec.js +++ b/end-to-end-test/remote/specs/core/results.spec.js @@ -203,10 +203,7 @@ describe('Results Page', function() { var url = `${CBIOPORTAL_URL}/results/mutations?tab_index=tab_visualize&cancer_study_list=ov_tcga_pub&cancer_study_id=ov_tcga_pub&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=ov_tcga_pub_mutations&Z_SCORE_THRESHOLD=2.0&case_set_id=ov_tcga_pub_3way_complete&gene_list=TP53+PTEN&gene_set_choice=user-defined-list&Action=Submit`; browser.url(url); $('[data-test=view3DStructure]').waitForExist({ - timeout: 10000, - }); - $('[data-test=view3DStructure]').waitForEnabled({ - timeout: 10000, + timeout: 20000, }); $('[data-test=oncogenic-icon-image]').waitForDisplayed({ timeout: 10000, diff --git a/src/AppStore.ts b/src/AppStore.ts index 6e8a8e12bbe..79aa281f56e 100644 --- a/src/AppStore.ts +++ b/src/AppStore.ts @@ -6,7 +6,7 @@ import { } from 'cbioportal-frontend-commons'; import { getLoadConfig, getServerConfig } from './config/config'; import _ from 'lodash'; -import internalClient from 'shared/api/cbioportalInternalClientInstance'; +import client from 'shared/api/cbioportalClientInstance'; import { sendSentryMessage } from './shared/lib/tracking'; export type SiteError = { @@ -96,9 +96,7 @@ export class AppStore { readonly portalVersion = remoteData({ invoke: async () => { - const portalVersionResult = await internalClient.getInfoUsingGET( - {} - ); + const portalVersionResult = await client.getInfoUsingGET({}); if (portalVersionResult && portalVersionResult.portalVersion) { let version = undefined; diff --git a/src/pages/patientView/clinicalInformation/PatientViewPageStore.ts b/src/pages/patientView/clinicalInformation/PatientViewPageStore.ts index 0ce71c16e26..8688463ea3f 100644 --- a/src/pages/patientView/clinicalInformation/PatientViewPageStore.ts +++ b/src/pages/patientView/clinicalInformation/PatientViewPageStore.ts @@ -16,7 +16,6 @@ import { ResourceData, Sample, SampleMolecularIdentifier, - StructuralVariantFilter, GenericAssayData, GenericAssayMeta, GenericAssayDataMultipleStudyFilter, @@ -200,6 +199,7 @@ import { } from 'shared/lib/GenericAssayUtils/MutationalSignaturesUtils'; import { getServerConfig } from 'config/config'; import { getOncoKbIconStyle } from 'shared/lib/AnnotationColumnUtils'; +import { StructuralVariantFilter } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; type PageMode = 'patient' | 'sample'; type ResourceId = string; @@ -613,7 +613,7 @@ export class PatientViewPageStore { .value(); if (mutationalSignatureContributionStableIds.length > 0) { - return client.fetchGenericAssayMetaDataUsingPOST({ + return client.fetchGenericAssayMetaUsingPOST({ genericAssayMetaFilter: { genericAssayStableIds: mutationalSignatureContributionStableIds, } as GenericAssayMetaFilter, @@ -1615,7 +1615,7 @@ export class PatientViewPageStore { }), } as StructuralVariantFilter; - return client.fetchStructuralVariantsUsingPOST({ + return internalClient.fetchStructuralVariantsUsingPOST({ structuralVariantFilter, }); } diff --git a/src/pages/patientView/structuralVariant/PatientViewStructuralVariantTable.tsx b/src/pages/patientView/structuralVariant/PatientViewStructuralVariantTable.tsx index fde2c5141a7..61b5b9bd14f 100644 --- a/src/pages/patientView/structuralVariant/PatientViewStructuralVariantTable.tsx +++ b/src/pages/patientView/structuralVariant/PatientViewStructuralVariantTable.tsx @@ -5,7 +5,6 @@ import { PatientViewPageStore } from '../clinicalInformation/PatientViewPageStor import LazyMobXTable, { Column, } from 'shared/components/lazyMobXTable/LazyMobXTable'; -import { StructuralVariant } from 'cbioportal-ts-api-client'; import TumorColumnFormatter from '../mutation/column/TumorColumnFormatter'; import HeaderIconMenu from '../mutation/HeaderIconMenu'; import GeneFilterMenu from '../mutation/GeneFilterMenu'; @@ -26,6 +25,7 @@ import { DEFAULT_ONCOKB_CONTENT_WIDTH, updateOncoKbIconStyle, } from 'shared/lib/AnnotationColumnUtils'; +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; export interface IPatientViewStructuralVariantTableProps { store: PatientViewPageStore; diff --git a/src/pages/patientView/structuralVariant/column/AnnotationColumnFormatter.tsx b/src/pages/patientView/structuralVariant/column/AnnotationColumnFormatter.tsx index 54418ef7a6c..b3fa2b9d63f 100644 --- a/src/pages/patientView/structuralVariant/column/AnnotationColumnFormatter.tsx +++ b/src/pages/patientView/structuralVariant/column/AnnotationColumnFormatter.tsx @@ -8,7 +8,7 @@ import { USE_DEFAULT_PUBLIC_INSTANCE_FOR_ONCOKB, oncoKbAnnotationSortValue, } from 'react-mutation-mapper'; -import { CancerStudy, StructuralVariant } from 'cbioportal-ts-api-client'; +import { CancerStudy } from 'cbioportal-ts-api-client'; import { IAnnotationColumnProps } from 'shared/components/mutationTable/column/AnnotationColumnFormatter'; import { CancerGene, IndicatorQueryResp } from 'oncokb-ts-api-client'; import { @@ -19,6 +19,7 @@ import { calculateOncoKbAvailableDataType, } from 'cbioportal-utils'; import AnnotationHeader from 'shared/components/mutationTable/column/annotation/AnnotationHeader'; +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; export default class AnnotationColumnFormatter { public static getData( diff --git a/src/pages/resultsView/ResultsViewPageStore.ts b/src/pages/resultsView/ResultsViewPageStore.ts index 91a5e0e89d6..5e422b63060 100644 --- a/src/pages/resultsView/ResultsViewPageStore.ts +++ b/src/pages/resultsView/ResultsViewPageStore.ts @@ -33,9 +33,12 @@ import { SampleIdentifier, SampleList, SampleMolecularIdentifier, +} from 'cbioportal-ts-api-client'; +import { StructuralVariant, StructuralVariantFilter, -} from 'cbioportal-ts-api-client'; +} from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import client from 'shared/api/cbioportalClientInstance'; import { CanonicalMutationType, @@ -3286,7 +3289,7 @@ export class ResultsViewPageStore sampleMolecularIdentifiers: filters, } as StructuralVariantFilter; - return await client.fetchStructuralVariantsUsingPOST({ + return await internalClient.fetchStructuralVariantsUsingPOST({ structuralVariantFilter: data, }); } @@ -5899,7 +5902,7 @@ export class ResultsViewPageStore if (_.isEmpty(filters)) { return []; } else { - return client.fetchStructuralVariantsUsingPOST({ + return internalClient.fetchStructuralVariantsUsingPOST({ structuralVariantFilter: { entrezGeneIds: [q.entrezGeneId], sampleMolecularIdentifiers: filters, diff --git a/src/pages/resultsView/ResultsViewPageStoreUtils.ts b/src/pages/resultsView/ResultsViewPageStoreUtils.ts index b56c3a350e1..f5d16c991c2 100644 --- a/src/pages/resultsView/ResultsViewPageStoreUtils.ts +++ b/src/pages/resultsView/ResultsViewPageStoreUtils.ts @@ -9,9 +9,11 @@ import { PatientFilter, PatientIdentifier, ReferenceGenomeGene, - StructuralVariant, Sample, } from 'cbioportal-ts-api-client'; + +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import { action, ObservableMap } from 'mobx'; import AccessorsForOqlFilter, { getSimplifiedMutationType, diff --git a/src/pages/resultsView/plots/PlotsTabUtils.tsx b/src/pages/resultsView/plots/PlotsTabUtils.tsx index 436241cb9e7..ffb05478568 100644 --- a/src/pages/resultsView/plots/PlotsTabUtils.tsx +++ b/src/pages/resultsView/plots/PlotsTabUtils.tsx @@ -22,8 +22,10 @@ import { Mutation, NumericGeneMolecularData, Sample, - StructuralVariant, } from 'cbioportal-ts-api-client'; + +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import { capitalize, remoteData, diff --git a/src/pages/studyView/StudyViewComparisonUtils.ts b/src/pages/studyView/StudyViewComparisonUtils.ts index 0ffda0d6039..d7eaa225a17 100644 --- a/src/pages/studyView/StudyViewComparisonUtils.ts +++ b/src/pages/studyView/StudyViewComparisonUtils.ts @@ -10,9 +10,13 @@ import { Sample, SampleIdentifier, SampleMolecularIdentifier, +} from 'cbioportal-ts-api-client'; + +import { StructuralVariant, StructuralVariantFilter, -} from 'cbioportal-ts-api-client'; +} from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import { getGroupParameters } from 'pages/groupComparison/comparisonGroupManager/ComparisonGroupManagerUtils'; import { LoadingPhase } from 'pages/groupComparison/GroupComparisonLoading'; import comparisonClient from 'shared/api/comparisonGroupClientInstance'; @@ -21,6 +25,7 @@ import { ChartTypeEnum } from 'pages/studyView/StudyViewConfig'; import { getGeneFromUniqueKey } from './TableUtils'; import client from 'shared/api/cbioportalClientInstance'; import { REQUEST_ARG_ENUM } from 'shared/constants'; +import internalClient from 'shared/api/cbioportalInternalClientInstance'; export function doesChartHaveComparisonGroupsLimit(chartMeta: ChartMeta) { return chartMeta.uniqueKey !== SpecialChartsUniqueKeyEnum.CANCER_STUDIES; @@ -145,7 +150,7 @@ export async function getSvData( geneIds: hugoGeneSymbols, }); - return client.fetchStructuralVariantsUsingPOST({ + return internalClient.fetchStructuralVariantsUsingPOST({ structuralVariantFilter: { entrezGeneIds: genes.map(g => g.entrezGeneId), sampleMolecularIdentifiers, diff --git a/src/shared/components/oncoprint/TooltipUtils.ts b/src/shared/components/oncoprint/TooltipUtils.ts index 0e1d609a6e6..78746a74bba 100644 --- a/src/shared/components/oncoprint/TooltipUtils.ts +++ b/src/shared/components/oncoprint/TooltipUtils.ts @@ -6,8 +6,10 @@ import { GenePanelData, MolecularProfile, Mutation, - StructuralVariant, } from 'cbioportal-ts-api-client'; + +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import client from 'shared/api/cbioportalClientInstance'; import { ClinicalTrackSpec, diff --git a/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts b/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts index 1eae76ced2d..e8904f2f90b 100644 --- a/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts +++ b/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts @@ -1,4 +1,5 @@ import client from 'shared/api/cbioportalClientInstance'; +import internalClient from 'shared/api/cbioportalInternalClientInstance'; import { GenericAssayMetaFilter, GenericAssayMeta, @@ -112,7 +113,7 @@ export function fetchGenericAssayMetaByProfileIds( genericAssayProfileIds: string[] ) { if (genericAssayProfileIds.length > 0) { - return client.fetchGenericAssayMetaDataUsingPOST({ + return client.fetchGenericAssayMetaUsingPOST({ genericAssayMetaFilter: { molecularProfileIds: genericAssayProfileIds, // the Swagger-generated type expected by the client method below @@ -126,7 +127,7 @@ export function fetchGenericAssayMetaByProfileIds( export function fetchGenericAssayMetaByEntityIds(entityIds: string[]) { if (entityIds.length > 0) { - return client.fetchGenericAssayMetaDataUsingPOST({ + return client.fetchGenericAssayMetaUsingPOST({ genericAssayMetaFilter: { genericAssayStableIds: entityIds, // the Swagger-generated type expected by the client method below diff --git a/src/shared/lib/StoreUtils.ts b/src/shared/lib/StoreUtils.ts index f526c9c427e..db9e659c7ce 100644 --- a/src/shared/lib/StoreUtils.ts +++ b/src/shared/lib/StoreUtils.ts @@ -33,7 +33,6 @@ import { ReferenceGenomeGene, Sample, SampleFilter, - StructuralVariant, } from 'cbioportal-ts-api-client'; import defaultClient from 'shared/api/cbioportalClientInstance'; import client from 'shared/api/cbioportalClientInstance'; @@ -109,6 +108,7 @@ import { } from 'shared/lib/MutationUtils'; import { ObservableMap } from 'mobx'; import { chunkCalls } from 'cbioportal-utils'; +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; export const MolecularAlterationType_filenameSuffix: { [K in MolecularProfile['molecularAlterationType']]?: string; diff --git a/src/shared/lib/oql/AccessorsForOqlFilter.ts b/src/shared/lib/oql/AccessorsForOqlFilter.ts index 6e923566a66..324b24369b2 100644 --- a/src/shared/lib/oql/AccessorsForOqlFilter.ts +++ b/src/shared/lib/oql/AccessorsForOqlFilter.ts @@ -2,8 +2,9 @@ import { Mutation, MolecularProfile, NumericGeneMolecularData, - StructuralVariant, } from 'cbioportal-ts-api-client'; +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import _ from 'lodash'; import { AlterationTypeConstants, diff --git a/src/shared/lib/oql/annotateAlterationTypes.ts b/src/shared/lib/oql/annotateAlterationTypes.ts index f03353efa4f..fd90c448361 100644 --- a/src/shared/lib/oql/annotateAlterationTypes.ts +++ b/src/shared/lib/oql/annotateAlterationTypes.ts @@ -1,8 +1,7 @@ import AccessorsForOqlFilter from './AccessorsForOqlFilter'; -import { - NumericGeneMolecularData, - StructuralVariant, -} from 'cbioportal-ts-api-client'; +import { NumericGeneMolecularData } from 'cbioportal-ts-api-client'; +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import { AlterationTypeConstants, AnnotatedMutation, diff --git a/src/shared/lib/oql/oqlfilter.ts b/src/shared/lib/oql/oqlfilter.ts index 263f24af72c..5b69ebeb433 100644 --- a/src/shared/lib/oql/oqlfilter.ts +++ b/src/shared/lib/oql/oqlfilter.ts @@ -18,11 +18,10 @@ import { ExtendedAlteration, AnnotatedStructuralVariant, } from '../../../pages/resultsView/ResultsViewPageStore'; -import { - NumericGeneMolecularData, - Mutation, - StructuralVariant, -} from 'cbioportal-ts-api-client'; +import { NumericGeneMolecularData, Mutation } from 'cbioportal-ts-api-client'; + +import { StructuralVariant } from 'cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal'; + import { Alteration } from 'shared/lib/oql/oql-parser'; import AccessorsForOqlFilter, { Datum,